FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=16942&edit=1

ID: 16942
Updated by: l.alberton@quipo.it
Reported By: brotherseven at gmail dot com
Summary: passing value lists into query placeholders
-Status: Open
+Status: Wont fix
Type: Feature/Change Request
Package: MDB2
Package Version: 2.5.0b2
PHP Version: Irrelevant
-Assigned To:
+Assigned To: quipo
Roadmap Versions:
New Comment:

-Status: Open
+Status: Wont fix
-Assigned To:
+Assigned To: quipo
Rewriting the prepared query this way from within the DBAL might not be
as simple as it might seem, and I'm afraid it wouldn't be very solid.
It's much easier to handle in the application code.


Previous Comments:
------------------------------------------------------------------------

[2009-12-24 05:55:13] richso

Description:
------------
I will suggest MDB2 to handle this request internally by
expanding the '?'
placeholder into the number of parameter passed in,
e.g.

original:
$sql = "select * from table1 where field1 in (?)";
$result = $mdb->getAll($sql, null, array(array('val1',
'val2', 'val3')));

internally expand the place holder to when MDB2 found
the value in array
of val*:
$sql = "select * from table1 where field1 in (?, ?, ?)";

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedDec 27, '09 at 10:48p
activeDec 27, '09 at 10:48p
posts1
users1
websitepear.php.net

1 user in discussion

L Alberton: 1 post

People

Translate

site design / logo © 2021 Grokbase