😕 I keep getting the following error "Unknown column 'cardid' in 'field list'" when I try to insert data into a table.
My SQL statement is:-
$sql = "INSERT INTO orders (cardid) values ('15')";
The column data type in MySQL is VARCHAR (20).
I've succesfully run this statement in PHPmyAdmin, and can't see why this won't work in PHP!
I've tried renaming the "cardid" column - no chage.
I've tried changing the data type of the column - no change
I've tried inserting data into other columns in the table with the same statement - that worked ok, so I know the SQL statement is ok.
Aaarrrgh!
Am I missing something simple here??!!
Please help, this is driving me nuts!!! 🙁