Jump to content

[SOLVED] Why won't this mysql line work?


AStrangerWCandy

Recommended Posts

Having the php program print out the mysql query it generates, and it looks fine.

 

INSERT INTO users (user_Id, userName, pass, firstName, lastName, country) VALUES (id4a99b9563701d, abcd, abcd, abcd, abcd, United States)

 

I cut and paste this line into phpmyadmin on the proper database and get

 

#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 'States)' at line 1

 

The columns match up perfectly in case and letters. All are VARCHAR 30 or higher

Link to comment
https://forums.phpfreaks.com/topic/172431-solved-why-wont-this-mysql-line-work/
Share on other sites

Thanks, what was it! However now that I removed the space  I submit this:

 

INSERT INTO users (user_Id, userName, pass, firstName, lastName, country) VALUES (id4a99b9563701d, abcd, abcd, abcd, abcd, UnitedStates)

 

and its giving me an error stating

 

#1054 - Unknown column 'id4a99b9563701d' in 'field list'

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.