0

I need to insert the following into my table...My users table has five columns id, username, password, name, entry. (im not submitting anything into entry just yet i will use php to do that later on) but for some reason i keep getting this error: #1054 - Unknown column 'const89' in 'field list' Why is it reading the value as a column?

INSERT INTO users  VALUES(1,const89,cdm89,constantin);

I have also tried INSERT INTO users (id,username,password,name) VALUES(1,const89,cdm89,constantin); which gives me the same exact error.

3 Answers 3

2

You need to put your strings in quotes:

INSERT INTO users  VALUES(1,'const89','cdm89','constantin');
Sign up to request clarification or add additional context in comments.

Comments

2

Just put quotes around your strings:

INSERT INTO users VALUES(1,'const89','cdm89','constantin');

Comments

1

Put your string values within quotes.

INSERT INTO users  VALUES(1,'const89','cdm89','constantin');

1 Comment

@slugonamission - I've edited the answer even before your comment :), you're right, thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.