Click here to get back home

PDO

 HomeNewsGroups | Search | About
 comp.lang.php    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
PDO Jeff 07-24-2008
`--> Re: PDO Rik Wasmus07-25-2008
Get Chitika Premium
Posted by Jeff on July 24, 2008, 6:33 pm
Please log in for more thread options
I have this bit of PDO:

$sql='INSERT INTO customer(first_name,last_name) values(?,?)';
$sth = $dbh->prepare($sql);
$sth->execute('First Name','Last Name');

Now that would be correct in Perl, what do I have to do to make that
work in PHP.

Is there not a succinct way to do this?

Jeff

Posted by Rik Wasmus on July 25, 2008, 1:26 am
Please log in for more thread options

> I have this bit of PDO:
>
> $sql=3D'INSERT INTO customer(first_name,last_name) values(?,?)';
> $sth =3D $dbh->prepare($sql);
> $sth->execute('First Name','Last Name');
>
> Now that would be correct in Perl, what do I have to do to make tha=
t =

> work in PHP.

$sth->execute(array('First Name','Last Name'));


Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap