prepared-statement Questions
4
Solved
Is it possible to use one parameter in a prepared mysqli-statement multiple times with only binding it one time?
something like this
$stmt = $mysqli->prepare(SELECT * FROM user WHERE age BETWEE...
Criticize asked 29/3, 2014 at 20:16
2
When I'm logging queries executed on Amazon Redshift by querying STL_QUERY table,
I get the prepared statement query, without the parameters values, for example:
SELECT * FROM events WHERE ts=$1
...
Chemar asked 28/8, 2014 at 10:33
2
Solved
Im building a large database call using PreparedStatement that has 2000+ parameter markers.
Im getting this error
Caused by: java.sql.SQLException: Prepared or callable statement has more than 20...
Huihuie asked 31/1, 2013 at 17:10
3
I am using a parametrized query utilizing Text object in SQLAlchemy and am getting an error.
Working example:
import sqlalchemy as sqlal
from sqlalchemy.sql import text
db_table = 'Cars'
id_cars...
Antler asked 25/9, 2018 at 9:15
4
Solved
I have a database table timetable with a DATETIME field called created_on.
created_on DATETIME,
notes VARCHAR(255) NOT NULL
I use the NOW() function to insert the current time through PDO prepar...
Amandaamandi asked 31/12, 2012 at 0:37
5
Solved
I have a table in the database:
create table store (
...
n_status integer not null,
t_tag varchar(4)
t_name varchar,
t_description varchar,
dt_modified timestamp not null,
...
);
In my st...
Lepton asked 3/10, 2012 at 11:20
3
Solved
I already create & use prepared statements by utilizing the libpq (of PostgreSQL). I am wondering if there is a way to delete a prepared statement without disconnecting the database? Or the bes...
Salamis asked 6/6, 2013 at 14:59
2
Solved
The MySQL JDBC Driver defines these two properties as:
useServerPrepStmts - Use server-side prepared statements if the server supports them?
cachePrepStmts - Should the driver cache the pars...
None asked 29/8, 2015 at 13:21
3
Solved
How to pass variable parameters dynamically
order = 10100
status = 'Shipped'
df1 = pd.read_sql_query("SELECT * from orders where orderNumber =""" +
str(10100) + """ and status = """ + 'status' ...
Karlise asked 5/2, 2018 at 18:44
25
Solved
I am currently using this type of SQL on MySQL to insert multiple rows of values in one single query:
INSERT INTO `tbl` (`key1`,`key2`) VALUES ('r1v1','r1v2'),('r2v1','r2v2'),...
On the readings...
Callosity asked 24/7, 2009 at 8:11
9
Solved
I'm using Perl's DBI module. I prepare a statement using placeholders, then execute the query.
Is it possible to print out the final query that was executed without manually escaping the parameter...
Fioritura asked 6/11, 2009 at 12:27
15
Solved
I have a general Java method with the following method signature:
private static ResultSet runSQLResultSet(String sql, Object... queryParams)
It opens a connection, builds a PreparedStatement us...
Detribalize asked 4/3, 2010 at 20:35
4
Solved
NOTE: I have narrowed this problem down to specifically PDO because I am able to successfully prepare and execute statements using the odbc_* functions.
Why can't I bind this parameter to the PDO ...
Dagley asked 7/7, 2016 at 21:33
3
Solved
The example from the PHP manual is using OOP. Is there a way to do it procedurally?
Gasoline asked 19/5, 2010 at 21:57
3
Solved
Let say I have a MySQL table like this:
VARCHAR 100 | VARCHAR 100 | VARCHAR 100
[ ID ] [ NAME ] [ NICKNAME ] [ FAVORITE_COLOR ]
1 John Johnny RED
2 Eric NULL GREEN
I want to select the 2nd ro...
Stringent asked 26/2, 2018 at 6:57
2
Solved
Right now I am in the middle of migrating from SQLite to Postgresql and I came across this problem. The following prepared statement works with SQLite:
id = 5
st = ActiveRecord::Base.connection.ra...
Educationist asked 10/12, 2012 at 17:5
6
Solved
I have found many ways to use the exec statement for PDO, but I'm not sure it helps me. My understanding is that I have to use the execute() function for prepared statements. I am updating a row wi...
Skater asked 9/5, 2012 at 19:5
4
Solved
I'm trying to insert CLOBs into a database (see related question). I can't quite figure out what's wrong. I have a list of about 85 clobs I want to insert into a table. Even when inserting only the...
Moldy asked 23/5, 2012 at 21:49
33
Solved
What are the best workarounds for using a SQL IN clause with instances of java.sql.PreparedStatement, which is not supported for multiple values due to SQL injection attack security issues: One ? p...
Auberbach asked 7/10, 2008 at 13:41
2
EDIT: I am seeing the same behavior in Python as PHP. Seems to be something with MySQL.
We are trying to upgrade from MySQL 5.7 to 8.0. Our codebase uses PHP MySQLi for queries to our MySQL server....
Dealfish asked 2/8, 2022 at 15:46
7
Solved
I'm trying to use prepared statements to set a table name to select data from, but I keep getting an error when I execute the query.
The error and sample code is displayed below.
[Microsoft][ODBC...
Shaffer asked 30/7, 2009 at 18:27
8
Solved
I have been learning to use prepared and bound statements for my sql queries, and I have come out with this so far, it works okay but it is not dynamic at all when comes to multiple parameters or w...
Boudreau asked 24/2, 2011 at 3:26
4
Solved
I'd like to use the IN clause with a prepared Oracle statement using cx_Oracle in Python.
E.g. query - select name from employee where id in ('101', '102', '103')
On python side, I have a list [1...
Hortatory asked 4/12, 2016 at 1:5
3
Solved
I want to make two prepared statements, one right after the other in PHP with MySQLi. I am a novice at PHP and MySQLi so I don't know whether I should close the statement, close the database connec...
Cloudland asked 9/3, 2012 at 20:16
23
I'm curious to know if it's possible to bind an array of values to a placeholder using PDO. The use case here is attempting to pass an array of values for use with an IN() condition.
I'd like to ...
Beowulf asked 28/5, 2009 at 11:17
1 Next >
© 2022 - 2025 — McMap. All rights reserved.