View Single Post
Old 11-17-2011, 07:11 PM   PM User | #2
kbluhm
Senior Coder

 
kbluhm's Avatar
 
Join Date: Apr 2007
Location: Philadelphia, PA, USA
Posts: 1,502
Thanks: 2
Thanked 258 Times in 254 Posts
kbluhm will become famous soon enough
In this example, since you are having to write out the entire INSERT query, it would make more send to turn rename the insert() method query():
PHP Code:
$data = array( "John""Smith" );
$sql "INSERT INTO names ( firstname, lastname) VALUES( ?, ? )";
$db->query$data$sql ); 
It would also seem more intuitive to have the query as the first parameter, and the array of values as an optional second parameter.
__________________
ZCE
kbluhm is offline   Reply With Quote