|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-08-31 10:46 UTC] pajoye@php.net
-Status: Open
+Status: Feedback
[2010-08-31 10:46 UTC] pajoye@php.net
[2010-08-31 11:15 UTC] damien at tournoud dot net
-Status: Feedback
+Status: Open
[2010-08-31 11:15 UTC] damien at tournoud dot net
[2010-08-31 11:33 UTC] damien at tournoud dot net
[2011-01-06 01:32 UTC] scottmac@php.net
-Summary: SQLite error "bind or column index out of range" with
some placeholders
+Summary: PDO SQLite error "bind or column index out of range"
with some placeholders
[2016-06-27 15:27 UTC] cmb@php.net
-Package: SQLite related
+Package: PDO SQLite
[2020-02-24 07:48 UTC] cmb@php.net
-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: cmb
[2020-02-24 07:48 UTC] cmb@php.net
[2020-03-08 04:22 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 06:00:02 2025 UTC |
Description: ------------ The following snippet results in a PDOException with message "SQLSTATE[HY000]: General error: 25 bind or column index out of range". For some reasons, relatively similar queries work (for example, without the aggregation, as in: "SELECT * FROM (SELECT :value value FROM sqlite_master) my_table" or without the table as in "SELECT COUNT(*) expression FROM (SELECT :value value) my_table"). Test script: --------------- <?php $db = new PDO('sqlite:/tmp/sqlite.db'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $query = $db->prepare('SELECT COUNT(*) expression FROM (SELECT :value value FROM sqlite_master) my_table'); $query->execute(array(':value' => 'my_value')); ?>