Solved

sqlsrv_query considered prepared statement

Posted on 2014-12-05
2
128 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
This article discusses how to create an extensible mechanism for linked drop downs.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

726 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