Solved

sqlsrv_query considered prepared statement

Posted on 2014-12-05
2
130 Views
Last Modified: 2014-12-06
Simple question I am sure.  

Is this considered a prepared statement in SQL Server in PHP?   Is this method the safest way when following the ideas of prepared statements for PHP in SQL Server?

$sql = "SELECT * FROM table.toys WHERE Id= ? or Id= ?";
$params = array(3,5);//relative to the two ? above

$stmt = sqlsrv_query( $conn, $sql, $params);

Open in new window

0
Comment
Question by:Zipbang
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 40484171
I've never used it that way but apparently it is.  http://php.net/manual/en/function.sqlsrv-query.php
0
 

Author Closing Comment

by:Zipbang
ID: 40484744
thank you
0

Featured Post

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses how to create an extensible mechanism for linked drop downs.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question