I’ve been looking at my screen too long today. I’m getting an SQL syntax error on the following code. Can’t for the life of me find it. Anyone else see it?
$q = 'CREATE TABLE orders ( '.
'id INT NOT NULL AUTO_INCREMENT, '.
'client MEDIUMINT(11) NOT NULL, '.
'rep MEDIUMINT(11) NOT NULL, '.
'amount INT NOT NULL, '.
'paid DATETIME, '.
'refunded DATETIME, '.
'payoptions VARCHAR(255) NOT NULL, '.
'paymethod VARCHAR(255) NOT NULL, '.
'payid INT NOT NULL, '.
'order VARCHAR(255) NOT NULL, '.
'currentorder VARCHAR(255) NOT NULL, '.
'san VARCHAR(255), '.
'type VARCHAR(50), '.
'created DATETIME NOT NULL, '.
'updated DATETIME, '.
'PRIMARY KEY(id))';
“ORDER” is a reserved mysql word, so you will need to tick it in your string `order`