PDA

View Full Version : MySQL error, #1064 - You have an error in your SQL syntax.


gsnedders
04-09-2004, 02:03 PM
I was adding a table in phpMyAdmin and when i clicked on go it produced this SQL CREATE TABLE `pm` (
`to` VARCHAR( 30 ) NOT NULL ,
`from` VARCHAR( 30 ) NOT NULL ,
`message` BLOB( 25000 ) NOT NULL ,
UNIQUE (
`to` ,
`from`
)
)
and this error
MySQL said:

#1064 - 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 '(25000) NOT NULL, UNIQUE (`to`, `from`))' at line 1

firepages
04-09-2004, 03:54 PM
make
BLOB( 25000 )

simply
blob

what version phpmyadmin? cos whilst it lets you input a size for BLOB fields they are ignored internally (by MySQL) and usually not shown

gsnedders
04-09-2004, 08:04 PM
The one built into cPanel 9.1.0-RELEASE 85, phpMyAdmin 2.5.6. Thanks.