For Programmers: Free Programming Magazines  


Home > Archive > PHP SQL > October 2005 > Pear::DB and WHERE clause param in PS









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Pear::DB and WHERE clause param in PS
invinfo@rcn.com

2005-10-03, 6:57 pm

Pear::DB and WHERE clause param in a Prepared Statement

It looks like the current API does not include an easy way to use a ?
placeholder in a where clause, with a Prepared Statement.

invinfo@rcn.com

2005-10-03, 6:57 pm

My mistake, you can certainly do this, (with Pear::DB) using a
combination of
stmt = Obj->prepare( ps )
rslt = Obj->execute( stmt, param_array)

where Obj is Object of type DB_Common or subclass ( psuedo code of
course )

I did note, (with Pear::DB) that you can actually get the "mysqli"
object, this way:
$objDB_common = DB::connect($dsn);
$obj = $objDB_common->connection;

I'm curious why the "$features" array in DB_mysqli has this setting
'prepare' => false,

It seems odd, but I've fixed my main problem.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com