Jump to content


Photo

Errors in query not sure where they are?


  • Please log in to reply
4 replies to this topic

#1 cameeob2003

cameeob2003
  • Members
  • PipPipPip
  • Advanced Member
  • 79 posts

Posted 01 July 2006 - 02:00 PM

Im trying to execute the following and i keep getting the following 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 '='nopic.jpg'",
team_name varchar(32) NOT NULL default",
team_


here is the script im trying to execute

CREATE TABLE users (
userid int(25) NOT NULL auto_increment,
first_name varchar(25) NOT NULL default",
last_name varchar(25) NOT NULL default",
username varchar(25) NOT NULL default",
password varchar(255) NOT NULL default",
encryptpass varchar(255) NOT NULL default",
email varchar(255) NOT NULL default",
location text NOT NULL,
steamid varchar(15) NOT NULL default",
handle varchar(25) NOT NULL default",
bio text NOT NULL,
photo varchar(255) NOT NULL default='nopic.jpg'",
team_name varchar(32) NOT NULL default",
team_tag varchar(15) NOT NULL default",
access text NOT NULL default='0'",
webs varchar(255) NOT NULL default='http://'",
sign_update datetime NOT NULL default '0000-00-00 00:00:00',
activated enum('0','1') default NULL,


#2 Barand

Barand
  • Moderators
  • Sen . ( ile || sei )
  • 18,017 posts

Posted 01 July 2006 - 07:45 PM

Try removing the "="
If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received






moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts

#3 cameeob2003

cameeob2003
  • Members
  • PipPipPip
  • Advanced Member
  • 79 posts

Posted 02 July 2006 - 07:49 AM

Thx that worked. I have a question though > why is it that you have to take away the "=" in order for it to proccess the form? Why do the "=" cause errors?

#4 Barand

Barand
  • Moderators
  • Sen . ( ile || sei )
  • 18,017 posts

Posted 02 July 2006 - 08:55 AM

http://dev.mysql.com...eate-table.html
If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received






moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts

#5 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 03 July 2006 - 05:20 AM

Thx that worked. I have a question though > why is it that you have to take away the "=" in order for it to proccess the form? Why do the "=" cause errors?

What does this have to do with processing the form?
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users