yoyoyo;11047421 wrote:MYSQL blew up with error message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'billing, support from variables' at line 1
I don't see that there is a MySQL syntax error there. Given a table:
mysql> describe variables;
+---------+----------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+---------+----------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| sales | tinytext | YES | | NULL | |
| billing | tinytext | YES | | NULL | |
| support | tinytext | YES | | NULL | |
+---------+----------+------+-----+---------+----------------+
4 rows in set (0.00 sec)
I can do:
mysql> select sales, billing, support from variables;
+-------+---------+---------+
| sales | billing | support |
+-------+---------+---------+
| Bill | Bob | Randy |
| Bill | Fred | Randy |
| Jim | Bob | Mike |
+-------+---------+---------+
3 rows in set (0.00 sec)
Furthermore, I can't see that "sales", "billing", or "support" are in the reserved words list.
Can you 1] tell us your MySQL server version, 2] ditto MySQL client version used by PHP, and 3] do as NogDog suggests, putting your SQL in a variable and have it echoed out before and after the query is performed to look for potential problems?