手机版
热门标签
站点地图
我要投稿
广告合作
联系我们
搜 索
广告位招租
广告位招租
切换导航
首页
人工智能
编程教程
编程导航
编程百科
编程问答
编程博文
编程实例
硬件设备
网络运营
软件教程
移动数码
办公软件
操作系统
网络运维
技术频道
▸ 编程语言
▸ 前端开发
▸ 移动开发
▸ 开发工具
▸ 程序设计
▸ 行业应用
▸ CMS系统
▸ 服务器
▸ 数据库
公众号推荐
微信公众号搜
"智元新知"
关注
微信扫一扫可直接关注哦!
prepared-statement
prepared-statement专题提供prepared-statement的最新资讯内容,帮你更好的了解prepared-statement。
Oracle的RETURNING INTO在Java中的使用(JDBC,Prepared Statement)
我使用JDBC执行Oracle语句,如下所示: "INSERT INTO MYTABLE(MYDATA) VALUES(?) RETURNING MY_CALCULATED_DATA INTO ?" // MYTABLE's def makes MY_CALCULATED_DATA be auto-generated by DB on insert 我在Java中找到了几种方法来调用上面的语句,主
作者:佚名 时间:2020-07-27
SQLite/C#连接池和准备语句混乱
我一直在花一些时间阅读不同的数据库和SQLite的最佳实践。在阅读时,我发现我在做许多事情,我不应该做,当试图解决这些问题时,我想到了一些更细致的使用SQLite与它的ADO实现的细节时困惑。 我的混淆特别来自准备的语句和连接池。 在阅读http://msdn.microsoft.com/en-us/library/ms971481.aspx时,我发现连接只应该为一个事务打开。一旦事务完成,则应关
作者:佚名 时间:2020-07-20
SQLite:将值的列表绑定到“WHERE col IN(:PRM)”
我所要做的就是发送一个查询 SELECT * FROM table WHERE col IN (110, 130, 90); 所以我准备了以下声明 SELECT * FROM table WHERE col IN (:LST); 然后我用 sqlite_bind_text(stmt, 1, "110, 130, 90", -1, SQLITE_STATIC); 不幸的是,这变成了 SELECT *
作者:佚名 时间:2020-07-20
在SQLite中,准备好的语句真的能提高性能吗?
我听说准备好的 SQLite声明应该提高表现。我写了一些代码来测试,并且没有看到使用它们的性能有任何差异。所以,我以为也许我的代码是不正确的。如果您发现我在做什么错误,请通知我… [self testPrep:NO dbConn:dbConn]; [self testPrep:YES dbConn:dbConn]; reuse=0 recs=2000 2009-11-09 10:39:18 -0
作者:佚名 时间:2020-07-20
为什么SQLite在使用Perl的DBD :: SQLite时为事务中的第二个查询提供“数据库被锁定”?
当使用Perl DBD :: SQLite时,SQLite在单个事务中为第二个查询提供“数据库已锁定”错误是否存在已知问题?场景:Linux,Perl DBI,AutoCommit => 0,一个带有两个代码块的子程序(使用块来本地化变量名).在第一个代码块中,一个查询句柄由select()在select语句中创建,它被执行()并且块被关闭.第二个代码块是通过准备更新语句创建的另一个查询句柄,并且
作者:佚名 时间:2020-07-23
postgresql – 存储过程作为查询:CallableStatement vs. PreparedStatement
PostgreSQL documentation建议使用 CallableStatement调用存储过程. 在返回行集的存储过程的情况下,使用CallableStatement有什么区别? String callString = "{ call rankFoos(?, ?) }"; CallableStatement callableStatement = con.prepareCall(call
作者:佚名 时间:2020-07-13
postgresql – Postgres函数与准备好的查询中的SQL注入
在Postgres中,准备好的查询和用户定义的函数是否等同于防止SQL注入的机制? 一种方法比另一种方法有特别的优势吗? 这取决于. SQL函数 使用LANGUAGE sql,答案通常是肯定的. 传递的参数被视为值,并且不能进行SQL注入 – 只要您不从主体调用不安全的函数并传递参数. PL / pgSQL函数 对于LANGUAGE plpgsql,答案通常是肯定的. 但是,PL / pgSQL允
作者:佚名 时间:2020-07-13
如何在Perl的DBI填充占位符后打印执行的SQL查询?
我使用Perl的DBI模块.我使用占位符准备一个语句,然后执行查询. 是否可以打印出执行的最终查询,而无需手动转义参数并将其放入占位符? 谢谢 请参阅 Tracing in DBI.以下工作使用DBD :: SQLite但产生大量的输出: $dbh->trace($dbh->parse_trace_flags('SQL|1|test')); 输出: < - 在booklet-excel.pl第21
作者:佚名 时间:2019-06-29
Perl DBI(MySQL)在预准备语句中放置单引号而不是实际参数
我正在尝试做一个简单的查询作为准备好的声明,但没有成功.这是代码: package sqltest; use DBI; DBI->trace(2); my $dbh = DBI->connect('dbi:mysql:database=test;host=***;port=3306','the_username', '****'); my $prep = 'SELECT me.id, me.s
作者:佚名 时间:2019-05-15
php – 从PDO准备语句中检索(或模拟)完整查询
我从两年前就绊倒了 this question. Is there a way to get the raw SQL string executed when calling PDOStatement::execute() on a prepared statement? For debugging purposes this would be extremely useful. 获胜的答案说明
作者:佚名 时间:2020-05-13
php – $stmt-> close()vs $stmt-> free_result()
我正在澄清$stmt-> close()和$stmt-> free_result()之间的差异,当完成一个准备好的 mysqli语句. 到目前为止,我使用: $mysqli = new mysqli(host,user,password,database); $stmt = $mysqli->prepare(sql statement); [...] $stmt->free_result(); $
作者:佚名 时间:2020-06-30
php – mysqli函数bind_result,store_result和fetch有什么区别?
知道在 mysqli_stmt_execute之后什么时候和什么呼叫,我遇到了问题 你怎么知道什么时候打电话 > mysqli_stmt_bind_result > mysqli_stmt_store_result > mysqli_stmt_fetch mysqli_stmt_bind_result()告诉mysqli当你提取一行时,你想要填充哪个变量,但是它并没有获取任何东西.在调用fetch
作者:佚名 时间:2020-06-30
php – mySqli使用通配符绑定参数LIKE
我遇到了将LIKE与Wildcard绑定到我在 MySQLi中准备好的语句的问题.我尝试了以下两种方法,如图所示& concat.(用@fancyPants输入更新) >有没有办法让我可以在绑定发生后查看自己的SQL语句? >如何正确绑定它以获得我想要的结果? 它没有LIKE语句. 我只能从使用某个搜索词中提取数据.我的代码有什么问题吗? $str = $_POST["searchstr"];
作者:佚名 时间:2020-07-01
如果使用准备好的PHP / MySQL查询,我是否需要清理输入?
鉴于以下代码,我是否需要逃离并消毒$city? <?php $mysqli = new mysqli("localhost", "my_user", "my_password", "world"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_conn
作者:佚名 时间:2020-07-01
php – Mysqli准备语句绑定顺序BY
我对 mysqli_stmt prepare函数有一个小问题.这是我的查询: $params = array( "sisi", "some_string", 5000, "date_added DESC" ); $sql = "SELECT * FROM scenes WHERE scene_title LIKE ?
作者:佚名 时间:2020-07-01
php – 何时调用mysqli :: close
我何时应该调用 mysqli :: close?我从来没有习惯使用if语句来检查bind_param(),prep()和execute()是否成功.我应该在方法的末尾(下面)调用$stmt-> close().或者我应该在每个条件之后调用它,确保我关闭数据库连接,即使进程在某个阶段失败,例如bind param. public function function_name($id,$new_id
作者:佚名 时间:2020-07-01
php – MYSQLi bind_result返回null
我试图输出我在查询中从数据库中获取的变量,但没有返回任何内容.使用MYSQLi编写的语句. 请参阅以下代码: $stmt = $con->prepare("SELECT first_name, last_name FROM transactions WHERE order_id = ?"); $stmt->bind_param('i', $order_id); $stmt->execute();
作者:佚名 时间:2020-07-01
PHP / PDO:准备语句在创建表时不起作用?
当我使用PDO预处理语句,并使用它来插入查询失败的表名时,一个简单的例子: $stmt = $dbh->prepare("CREATE TABLE ? (id foo, int bar,...)"); $stmt->execute(Array('table_foobar')); 它所做的只是替换?使用’table_foobar’,单引号不允许为我创建表格! 我最终需要在预准备语句的TOP上执行sp
作者:佚名 时间:2020-07-02
php – 使用预准备语句检查数据库中是否已有电子邮件
我试图将我的代码从 mysql更改为msqli预处理语句.我不知道如何调整我目前工作的代码以检查数据库中是否已有电子邮件.以下是我目前正在使用的代码.如何将其更改为准备好的语句并获得相同的结果? //if email is equal to an email already in the database, display an error message if(mysql_num_rows(m
作者:佚名 时间:2020-07-02
在非对象PHP帮助上调用成员函数prepare()
我正在尝试编写一个 PHP函数.这很简单它只是一个准备好的语句来查询数据库,但是我无法让它工作.我不断收到错误调用一个非对象的成员函数prepare().这里是代码: $DBH = new mysqli("host", "test", "123456", "dbname"); function selectInfo($limit, $offset){ $stmt = $DBH->prepa
作者:佚名 时间:2020-07-03
上一页
10
11
12
13
14
15
16
17
下一页
小编推荐
苹果市值2025年有望达4万亿美元
• 联想拯救者新一代Y700平板通过IMDA认证
• 最新AI生图模型Flux1.1刷屏!添加单反相
• 联发科天玑 9400 频率敲定,3.626GHz 最
• 苹果新品发布会来了!5款产品面临停产
• 佳能R5C Mark II配置曝光:双系统设计,
• AI应用的东风,奥特曼不想错过
• 为新品让路!苹果定制版Mac发货延期
热门标签
更多
python
JavaScript
java
HTML
PHP
reactjs
C#
Android
CSS
Node.js
sql
r
python-3.x
MysqL
jQuery
c++
pandas
Flutter
angular
IOS
django
linux
swift
typescript
路由器
JSON
路由器设置
无线路由器
h3c
华三
华三路由器设置
华三路由器
电脑软件教程
arrays
docker
软件图文教程
C
vue.js
laravel
spring-boot