PDO

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jeff

    PDO

    I have this bit of PDO:

    $sql='INSERT INTO customer(first_ name,last_name) values(?,?)';
    $sth = $dbh->prepare($sql );
    $sth->execute('Fir st 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
  • Rik Wasmus

    #2
    Re: PDO

    On Fri, 25 Jul 2008 00:33:36 +0200, Jeff <jeff@spam_me_n ot.comwrote:
    I have this bit of PDO:
    >
    $sql='INSERT INTO customer(first_ name,last_name) values(?,?)';
    $sth = $dbh->prepare($sql );
    $sth->execute('Fir st Name','Last Name');
    >
    Now that would be correct in Perl, what do I have to do to make that
    work in PHP.
    $sth->execute(array( 'First Name','Last Name'));

    Comment

    Working...