Unknown column when column does exist.
| From: | lmlweb@mybc.com | Date: | Sat, 23 Feb 2002 22:57:41 +0000 |
| Subject: | Unknown column when column does exist. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-85964@lists.php.net to get a copy of this message | ||
I've just created a "add record to table" type of page - basically copied
a working php file I have on hand, and changed the values etc.
Now, I am having problems trying to troubleshoot something. Basically
my mySQL query is:
INSERT INTO events (TITLE, SUMMARY, ORG, CITY, PROVINCE, DATE, REG_DATE,
FEE) VALUES ('Another Event', 'Summary of this event goes here', 'Another
Organization', 'Coquitlam', 'BC', 'Another Date', 'Another
Date', '$250')
and I have a coding in my php file that pretty much tells mySQL if it
can't insert this, spit out the problem:
Can't execute INSERT INTO events (TITLE, SUMMARY, ORG, CITY, PROVINCE,
DATE, REG_DATE, FEE) VALUES ('Another Event', 'Summary of this event
goes here', 'Another Organization', 'Coquitlam', 'BC',
'Another Date',
'Another Date', '$250') Unknown column 'ORG' in 'where
clause'
Okay, there's an ORG column in the database table, and if I check my
mySQL phpAdmin interface (even ran the same query in the myPHPAdmin interface),
the very record has been inserted into the
database without problems. So the inserting record into database part
isn't the problem - it seems to me that the problem is that somewhere
along the line, PHP is confused and is telling me something else.
Ideas?
Thanks!
--
Laurie Landry
lmlweb@mybc.com - email
(604) 693-1120 - voicemail/fax