Top "Prepared-statement" questions

A Prepared Statement (or parameterized statement) is a precompiled SQL statement that serves to improve performance and mitigate SQL injection attacks.

$stmt->close() vs $stmt->free_result()

I am trying to clarify the difference between $stmt->close() and $stmt->free_result() when finalizing a prepared …

php mysql mysqli prepared-statement
PDOstatement (MySQL): inserting value 0 into a bit(1) field results in 1 written in table

I'm using a bit(1) field to store boolean values and writing into the table using PDO prepared statements. This is …

php mysql pdo prepared-statement
Confusion between prepared statement and parameterized query in Python

As far as I understand, prepared statements are (mainly) a database feature that allows you to separate parameters from the …

python database prepared-statement sql-injection parameterized-query
What is the difference between prepared statements and SQL or PL/pgSQL functions, in terms of their purpose?

In PostgreSQL, what is the difference between a prepared statement and a SQL or PL/pgSQL function, in terms of …

sql postgresql prepared-statement plpgsql sql-function
How to use prepared statement efficiently using datastax java driver in Cassandra?

I need to query one of the tables in Cassandra using Datastax Java driver. Below is the code I have …

java cassandra prepared-statement datastax-java-driver
ODBC prepared statements in PHP

I'm trying to use odbc_prepare and odbc_execute in PHP as follows: $pstmt=odbc_prepare($odb_con,"select * from …

php odbc prepared-statement
SQLException: Invalid parameter index 1 only with PreparedStatement

I have got a webapp(JSP/Servlet) with Tomcat8 + SQL Server2012 JDBC Driver Type 4: JTDS old version 1.2.5 (http://jtds.sourceforge.…

java sql-server-2012 prepared-statement sql-injection jtds
How to prepare statements and bind parameters in Postgresql for C++

I'm quite new to C++ and know a little bit about pqxx library. What I want to implement is to …

c++ postgresql prepared-statement libpqxx
sql query execute with PreparedStatement

I have the follow code in a servlet - String loginID = request.getParameter("loginId").toString(); String loginPassword = request.getParameter("loginPassword").…

java sql servlets prepared-statement executequery
What's the difference between cachePrepStmts and useServerPrepStmts in MySQL JDBC Driver

The MySQL JDBC Driver defines these two properties as: useServerPrepStmts - Use server-side prepared statements if the server supports them? …

mysql database caching jdbc prepared-statement