Jump to content

Recommended Posts

I'm getting this error

MySQL said: Documentation
#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 'â€

when I try to run this query

PRIMARY KEY ( `user_id` )
) ENGINE = MYISAM DEFAULT CHARSET = latin1CREATE TABLE `messages` (
`id` int( 11 ) NOT NULL AUTO_INCREMENT ,
`from` varchar( 255 ) NOT NULL DEFAULT‘0′,
`to` varchar( 255 ) NOT NULL DEFAULT‘0′,
`message` longtext NOT NULL ,
`title` varchar( 255 ) NOT NULL DEFAULT”,
`time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ,
`read` int( 1 ) NOT NULL DEFAULT‘0′,
PRIMARY KEY ( `id` )
) ENGINE = MYISAM DEFAULT CHARSET = latin1 CREATE TABLE `users` (
`id` int( 11 ) NOT NULL AUTO_INCREMENT ,
`username` varchar( 255 ) NOT NULL DEFAULT”,
`password` varchar( 32 ) NOT NULL DEFAULT”,
`name` varchar( 255 ) NOT NULL DEFAULT”,
`email` varchar( 255 ) NOT NULL DEFAULT”,
`ip` varchar( 255 ) NOT NULL DEFAULT”,
`admin` int( 1 ) NOT NULL DEFAULT‘0′,
PRIMARY KEY ( `id` )
) ENGINE = MYISAM DEFAULT CHARSET = latin1

I checked it but I can't Find any error's

Can someone help me?

If what you posted is actually the query, I'm not in the least surprised that you got errors.  It looks like a thoroughly mangled copy/paste mess.

 

http://dev.mysql.com/doc/refman/4.1/en/reserved-words.html ought to be mandatory reading.  Check that are revise your code to avoid reserved words as table names or field names.  In your table, at least to, from, and read are reserved words.

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.