Hi Everyone,

I have a MySQL database that I am accessing from PHP. The table in question has a auto increment field on it and I don't want to include that in my add/edit/update query's to the database... But I can't seem to figure out how to ignore it? Everything I have done seems to fail.. I am using prepared statements so I"m not sure it that is it, but I would like to keep using them since it reduces the security issues a little... Here is the code from one of my prepared statements:

//Create the statement
mysqli_stmt_prepare($stmt, "INSERT INTO legionCurrent VALUES ( ?,?,?,?,?,?,?,?)"); mysqli_stmt_bind_param($stmt, 'ssssssss', $FName, $LName, $Add1, $Add2, $City, $State, $Zip, $XCode)or die(mysqli_error($addlink));
//Add the record
mysqli_stmt_execute($stmt) or die(mysqli_error($addlink));

Here is the error I get in my logs:

[Fri Apr 4 09:35:32 2008] [error] PHP Warning: mysqli_stmt_bind_param() [<a href='function.mysqli-stmt-bind- param'>function.mysqli-stmt-bind-param</a>]: invalid object or resource mysqli_stmt\n in /Volumes/RAIDer/webserver/Documents/dev/ OLDBv2/add.php on line 91

Line 91 is the mysqli_stmt_bind_param() line above

My database structure looks like this:

| FName | LName | Add1 | Add2 | City | State | Zip | XCode | Reason | Record

I know there is away to do it, but all my searching and reading hasn't told me anything... I've looked in the php manual, and mysql, plus various websites... and I just can't figure this one out... RTFM's are appreciated, as long as M is defined! :)

Thanks for taking the time to look!



--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424-9337
www.raoset.com
[EMAIL PROTECTED]



Reply via email to