I have 43 columns in my Table.
I am trying to use Object Oriented programming and have been successful in the past just not so many columns.
If I address all of them with an "$this->" will I be able to use:
$sql = "INSERT INTO Table VALUES ('$this->a','$this->b','...)";
Currently it is not returning my header and I have double checked the syntax of the "INSERT".
You'd answer your own question by echoing $sql onto a webpage.
Inspect the string closely looking for errors.
Paste that string into whatever you manage your database with.
Look at the resulting error message.
If it is all on one line, then break the lines down with hard returns to isolate the offending line.
Generally though, the usual error is just a mismatch between the number of columns expected, and the number you provide.
If you're using OOP, then you'd perhaps be best advised to look at using PDO (PHP Data Objects) to communicate with your db.
This topic is now closed. New replies are no longer allowed.