C
C
Cyril2016-12-02 08:26:22
PHP
Cyril, 2016-12-02 08:26:22

How to use MSsql through php (sqlsrv) to draw a conclusion. values ​​in the table?

Hello, I got confused with the syntax, there is a block in which you need to display the value from one cell in the table.

$sql = "SELECT Ptittle FROM dbo.Pcontent WHERE Pname=$Fname";
$stmt = sqlsrv_query( $conn, $sql );
echo $stmt;

 ?>

The name of the line from where to pull out is determined by the name of the current open file, which is entered into a variable, this is important.
at the output I get this:
SELECT Ptittle FROM dbo.Pcontent WHERE Pname=mopr
instead of the contents of the cell, I will be glad if you tell me

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
krypt3r, 2016-12-02
@krypt3r

Answers here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question