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.

Insert row into database with PreparedStatement

I want to insert a row into a table using PreparedStatement. The table got 3 columns(int, String, String). The thing …

java mysql prepared-statement
Insert using PreparedStatement. How do I auto-increment the ID?

I have a PreparedStatement such as: PreparedStatement preparedStatement = connect.prepareStatement("INSERT into employee (id, time, name" + "(?,?,?)",Statement.RETURN_GENERATED_KEYS); …

java mysql prepared-statement mysql-connector
How to prepare statement for update query?

I have a mysqli query with the following code: $db_usag->query("UPDATE Applicant SET phone_number ='$phone_…

php mysql mysqli prepared-statement bindparam
Get last insert id after a prepared insert with PDO

I'm using PHP PDO with PostgreSQL for a new project. Given the following function, how can I return the id …

php postgresql pdo prepared-statement
PHP - Using PDO with IN clause array

I'm using PDO to execute a statement with an IN clause that uses an array for its values: $in_array = …

php mysql pdo prepared-statement in-clause
How can I Insert JSON object into Postgres using Java preparedStatement?

I’m struggling to insert a JSON object into my postgres v9.4 DB. I have defined the column called "evtjson" …

java json postgresql prepared-statement
I can't understand the reason behind ORA-01722: invalid number

I have an issue that is generated randomly (one time between thousandth of calls). The error ORA-01722: invalid number is …

java oracle jdbc prepared-statement ora-01722
JDBC - How to set char in a prepared statement

I cannot find any method like char c = 'c'; preparedStatement.setChar(1, c); How to set character to a prepared statement?

java jdbc prepared-statement
PDO were rows affected during execute statement

I have found many ways to use the exec statement for PDO, but I'm not sure it helps me. My …

php mysql pdo prepared-statement
using JDBC preparedStatement in a batch

Im using Statements batchs to query my data base. Iv'e done some research now and i want to rewrite my …

java jdbc batch-file prepared-statement