NYCPHP Meetup

NYPHP.org

[nycphp-talk] say it ain't so RE mysqli_stmt_bind_param()

David Mintz dmintz at davidmintz.org
Thu Mar 24 15:02:07 EST 2005


Is it correct that you have to do something like this:

mysqli_stmt_bind_param($stmt, "ssssssss",
    $student['lastname'],
    $student['firstname'],
    $student['middle_initial'],
    $student['address1'],
    $student['city'],
    $student['state'],
    $student['postal_code'],
    $student['email']
    );

and you cannot pass an array as the last argument, like this:

mysqli_stmt_bind_param($stmt, "ssssssss",array_values($student));

...or am I missing something? Some other shortcut, perhaps?

This seems kind of painful, but then again maybe I'm a spoiled brat --
a PEAR/DB-spoiled brat, to be exact.

---
David Mintz
http://davidmintz.org/



More information about the talk mailing list