|
Posted by petersprc on 06/21/07 19:42
On Jun 21, 3:00 pm, j...@fastermail.com wrote:
> I need some assistance on how to create a select statement using PEAR
> DB or MySQL with the LIKE function.
> That is I am looking of how I can get statement like this work.
> SELECT * FROM customer WHERE name LIKE '%?'
require_once('MDB2.php');
$mdb2 = MDB2::singleton('mysql://user:password@host/db');
$mdb2->loadModule('Extended');
$rows = $mdb2->extended->getAll(
'select * from customer where name like ?',
null, array('%bob%'));
Navigation:
[Reply to this message]
|