Unknown Column on Confirm.php, fixes elsewhere in forum aren't working
When attempting to checkout from the confirm.php page, I get the following error:
Unknown column 'M00122' in 'field list'
The order is inserted into the 'orders' table properly, but nothing shows up in the orderdetails table.
I've found similar events in numerous posts throughout this forum.
'M00122' is the part number of the product in the cart, so first I changed the DetailProductID in the orderdetails table to varchar rather than INT, which appears to be the fix for most. Still get the same error after this change. Dumped cache and sessions and tried a new browser, same error.
As suggested in another thread, on the confirm.php code I changed:
$WA_editCmd = mysql_query($WA_sql, $WA_connection) or die(mysql_error());
to:
$WA_editCmd = mysql_query($WA_sql, $WA_connection) or die(mysql_error()."<br />".$WA_sql);
Then, rerunning the pages, I get:
Notice: Undefined variable: WA_sql in /Applications/XAMPP/xamppfiles/htdocs/beta/00_Aveo/confirm.php on line 292
Notice: Undefined variable: WA_sql in /Applications/XAMPP/xamppfiles/htdocs/beta/00_Aveo/confirm.php on line 292
Query was empty
I also tried modifying the ecart Object column for ID from number to text, thinking maybe that was the problem. Didn't work so I changed it back.
You can access and test the pages yourself at products/
I've attached the confirm.php page if that helps.