I have never used serialized variables before, but I have some arrays I wish to store. So, I serialized a bunch of variables and am attempting to store them in a database. However, it is not working--and I don't even know if it is because of the serialized variables. I can't figure it out. Here's what the query looks like with some values in it:
INSERT INTO quote(quoteID, Dbproduct, Product, Gauge, Color, FrontFinish,
BackFinish, Quantity, id, chosen, custID)
VALUES(null,
'a:4:{i:0;s:5:\"Box 1\";i:1;s:11:\"Light Maple\";i:2;s:2:\"XB\";i:3;s:14:\"Natural Cherry\";}',
'a:4:{i:0;s:4:\"Box1\";i:1;s:11:\"Light Maple\";i:2;s:2:\"XB\";i:3;s:14:\"Natural Cherry\";}',
'a:4:{i:0;s:4:\"3/16\";i:1;s:3:\"1/8\";i:2;s:4:\"3/16\";i:3;s:3:\"1/8\";}',
'a:4:{i:0;s:5:\"White\";i:1;s:10:\"Pure White\";i:2;s:5:\"Flint\";i:3;s:3:\"Fog\";}',
'a:4:{i:0;s:19:\"Marker Board Finish\";i:1;s:5:\"Pixel\";i:2;s:9:\"Sandstone\";i:3;s:6:\"Stucco\";}',
'a:4:{i:0;s:19:\"Marker Board Finish\";i:1;s:5:\"Pixel\";i:2;s:9:\"Sandstone\";i:3;s:10:\"Supermatte\";}',
'a:4:{i:0;s:1:\"3\";i:1;s:1:\"2\";i:2;s:1:\"3\";i:3;s:1:\"5\";}',
3, 'quote', 6)
Here's what the table looks like:
mysql> describe quote;
+-------------+----------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default| Extra |
+-------------+----------------------+------+-----+---------+----------------+
| quoteID | int(10) unsigned | | PRI | NULL |auto_increment |
| Dbproduct | varchar(255) | | | | |
| Product | varchar(255) | | | | |
| Gauge | varchar(255) | | | | |
| Color | varchar(255) | | | | |
| FrontFinish | varchar(255) | | | | |
| BackFinish | varchar(255) | | | | |
| Quantity | varchar(255) | | | | |
| id | tinyint(3) unsigned | | | 0 | |
| chosen | varchar(5) | | | | |
| custID | smallint(5) unsigned | | | 0 | |
+-------------+----------------------+------+-----+---------+----------------+
11 rows in set (0.00 sec)
Any help on this would be greatly appreciated. I have tried running it directly in MySQL and it tells me I have an error near 'quote(quoteID, Dbproduct, Product, Gauge, Color, FrontFinish, but I don't see how something in there could be the problem.