Hi everyone.
I have a script that I've been using succesfully for quite awhile,
and
just today found a bug...
I attempted to insert a new record into the database and got this
error in my error log:
[Fri Dec 21 11:08:43 2007] [error] PHP Warning:
mysqli_stmt_bind_param() expects parameter 1 to be mysqli_stmt,
boolean given in /Volumes/RAIDer/webserver/Documents/OLDB/add.php
on
line 31
[Fri Dec 21 11:08:43 2007] [error] PHP Warning:
mysqli_stmt_execute()
expects parameter 1 to be mysqli_stmt, boolean given in /Volumes/
RAIDer/webserver/Documents/OLDB/add.php on line 33
[Fri Dec 21 11:08:43 2007] [error] PHP Warning:
mysqli_stmt_affected_rows() expects parameter 1 to be mysqli_stmt,
boolean given in /Volumes/RAIDer/webserver/Documents/OLDB/add.php
on
line 35
[Fri Dec 21 11:08:43 2007] [error] PHP Warning:
mysqli_stmt_close()
expects parameter 1 to be mysqli_stmt, boolean given in /Volumes/
RAIDer/webserver/Documents/OLDB/add.php on line 41
And those lines from my script are:
//Create the statement
$stmt = mysqli_prepare($link, "INSERT INTO current VALUES
(?, ?, ?, ?, ?, ?, ?, ?, ?)");
mysqli_stmt_bind_param($stmt, 'sssssssss', $FName, $LName, $Add1,
$Add2, $City, $State, $Zip, $XCode, $Record);
//Add the record
mysqli_stmt_execute($stmt);
printf("%d Row Inserted.\n", mysqli_stmt_affected_rows($stmt));
// Redirect back to index.php for viewing
//header("Location: index.php");
//Close the statement
mysqli_stmt_close($stmt);
?>
The $stmt is line 30 only thing above it is mapping the post info
to
the field names to be inserted.
With my limited knowledge of mysqli functions, it could be the
issue... But what I don't get is why this bug is rearring it's head
now... When I'm supposed to go on vacation for a few weeks...
Any help would be greatly appreciated.
The basics of what I used was copied directly from the php.net
site.
so I'm very confused...