Re: Problems w/ insert

"Ethan Rosenberg, PhD" <[email protected]>
Newsgroups gmane.comp.php.database
Organization Hygeia Biomedical Research, Inc.
Message-ID <[email protected]>
Dear list -

   Here is my code:

$sql3 = "select max(Indx) from Visit3";
             $result7 = mysqli_query($cxn, $sql3);
             $row7 = mysqli_fetch_array($result7, MYSQLI_BOTH);

             $Indx = $row7[0];
             $sql2 =  "INSERT INTO Visit3(Indx, Site, MedRec, Notes, 
Weight, BMI, Date) VALUES(?, ?, ?, ?, ?, ?, ? )";

             mysqli_stmt_prepare( $stmt, $sql2 );

             $_POST['Indx'] = $Indx;

             $_POST['Date'] = $Date;

             mysqli_stmt_bind_param($stmt, 'isisiis', $_POST['Indx'], 
$_POST['Site'], $_POST['MedRec'],
                 $_POST['Notes'], $_POST['Weight'], $_POST['BMI'], 
$_POST['Date']);
             mysqli_execute($stmt);
             mysqli_stmt_bind_result($stmt, $_POST['Indx'], 
$_POST['Site'], $_POST['MedRec'],  $_POST['Notes'],
                 $_POST['Weight'], $_POST['BMI'], $_POST['Date']); 
*//The error is in this statement*
            mysqli_stmt_fetch($stmt);
            mysqli_stmt_close($stmt);

*Warning: mysqli_stmt_bind_result(): Number of bind variables doesn't match number of fields in prepared statement*

*
*
Help and advice, please.

Ethan Rosenberg

-- 
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.