SQL ERROR: 1054 - it thinks a value is a column

Discussion on a SQL Parser for EasyMOD
Locked
primehalo
Registered User
Posts: 1
Joined: Tue Sep 11, 2007 9:01 pm

SQL ERROR: 1054 - it thinks a value is a column

Post by primehalo » Tue Sep 11, 2007 9:17 pm

I'm trying to make my MOD compatible with easyMOD, but I'm getting caught up on the SQL. I have this:

Code: Select all

INSERT INTO phpbb_config (config_name, config_value) VALUES (allow_birthdays, 2);
It passes the Proposed Database Alterations syntax check okay, but when it's time to execute I get this error:

Code: Select all

The failed line was:

INSERT INTO phpbb_config(config_name,config_value) VALUES(allow_birthdays,2);;


SQL ERROR: 1054
Unknown column 'allow_birthdays' in 'field list'
Why does it think the value 'allow_birthdays' is a column?

UPDATE
Answered my own question - allow_birthdays needs to be enclosed by single quotes. I had tried backquotes and double-quotes, but I failed to try just plain single quotes.

Locked