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.

Does Python support MySQL prepared statements?

I worked on a PHP project earlier where prepared statements made the SELECT queries 20% faster. I'm wondering if it works …

python mysql prepared-statement
Java PreparedStatement retrieving last inserted ID

This answer to this question done this way seems to be very difficult to find on the internet. Basically I …

java mysql jdbc prepared-statement
Variable column names using prepared statements

I was wondering if there was anyway to specify returned column names using prepared statements. I am using MySQL and …

java sql jdbc prepared-statement
How to insert into MySQLusing a prepared statement with PHP

I am just learning about databases and I want to be able to store user inputs. What would be a …

php mysql mysqli prepared-statement
Two different prepared statements in one single batch

I want to send two different prepared statements in one single batch. Currently I am doing this in two as …

java sql jdbc prepared-statement
Use of PDO in classes

I have a few classes that perform some MySQL queries and prepared statements. However, I am lost in how to …

php mysql pdo prepared-statement
PDO error: SQLSTATE[HY000]: General error: 2031

I'm getting this annoying error and although I have an idea of why I'm getting it, I can't for the …

php mysql pdo prepared-statement
Can PreparedStatement.addBatch() be used for SELECT queries?

Imagine that I have 100 SELECT queries that differ by one input. A PreparedStatement can be used for the value. All …

java sql prepared-statement
Using Prepared Statement, how I return the id of the inserted row?

I want retrieve the id of a inserted row in the database, but I don't know how to do this. …

php mysql mysqli prepared-statement
JDBC Prepared Statement . setDate(....) doesn't save the time, just the date.. How can I save the time as well?

I have the following Query : INSERT INTO users (user_id, date_created) VALUES (?,?) I have the following prepared statement PreparedStatement …

java jdbc prepared-statement