Re: Prepared Statements Insert Problem - Any more ideas?

Matijn Woudt <[email protected]>
Newsgroups gmane.comp.php.database
Message-ID <CAC_gtuN92zhMOxymgGvTOdkspxoeqsZrYz8mh4gjj6kVV3q1WA@mail.gmail.com>
On Sun, Sep 2, 2012 at 10:41 PM, Ethan Rosenberg, PhD
<[email protected]> wrote:
> On Sun, Sep 2, 2012 at 6:45 AM, Ethan Rosenberg, PhD
> <[email protected]> wrote:
>>
>> Dear List -
>>
>> I wish to accomplish the following with prepared statements:
>>
>>   $stmt = mysqli_stmt_init($cxn);
>>      if($stmt = mysqli_stmt_prepare($stmt, "INSERT INTO Intake3 (Site,
>> MedRec, Fname, Lname, Phone, Height, Sex, Hx, Bday, Age)
>> VALUES(?,?,?,?,?,?,?,?,?,?")!=0)
>
>
>
>> Help and advice, please.
>>
>> Ethan Rosenberg
>>
> *+++++++++++++++++
>
> Any more idead?

You're still missing the closing parenthesis here, and I told you that
mysqli_error should give you some more info. Did you try that? Your
reply with 'no error'  doesn't really make sense on it's own..

Also, IIRC, I think you need to use one extra set of parenthesis, like this:

if(($stmt = mysqli_stmt_prepare()) != 0)

- Matijn

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.