Originally Posted by
Norm
The source code line number of where the error occurs is in the text of the message. If you want help, you'll have to post the full text of the error message.
Is the value of statement null after the call to connect?
Or is OrderClass null?
Thanks norm, I worked it out - it was "connection", it was null. I need to open another connection for some reason.
There's another issues now, but I think I know what it is.
+-------------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+-------------+------+-----+---------+----------------+
| groupID | int(11) | NO | PRI | NULL | auto_increment |
| bookingDate | varchar(10) | NO | | NULL | |
| actualDate | datetime | YES | | NULL | |
| totalCost | int(11) | NO | | NULL | |
| hireLength | int(11) | NO | | NULL | |
| noPeople | int(11) | NO | | NULL | |
| sName | varchar(25) | YES | | NULL | |
+-------------+-------------+------+-----+---------+----------------+
I'm getting this "Invalid Query: Column Count Doesn't Match Value Count At Row 1" when I try and insert this:
"INSERT INTO group_order VALUES( '" +
OrderClass.bookingDate + "', " +
"NOW()" + ", " +
"'" + totalPrice + "', " +
"'" + OrderClass.hireLength +"', " +
"'" + OrderClass.numberPeople + "', " +
"'" + OrderClass.secondName + "')"
I haven't accounted for the auto_incrementing groupID. I was under the impression MySQL created it for you? As it obviously doesn't, how do you account for that in the INSERT command?