mysql: wont reconize a column
Posted: Sun Jan 19, 2003 11:33 pm
Here is the table structure:
and there are several entries, all using every filed. but when i use this query in PHP and phpMyAdmn:
SELECT * FROM news comments WHERE parent='$id' ORDER BY date ASC
i get the error: Unknown column 'parent' in 'where clause'
Why is it giving me this error? I can insert data into this column without any problems. but selecting stuff i get this error. it doesn't make sense!
Code: Select all
CREATE TABLE `news comments` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`parent` INT NOT NULL ,
`author` VARCHAR( 60 ) NOT NULL ,
`date` DATE NOT NULL ,
`comment` TEXT NOT NULL
);SELECT * FROM news comments WHERE parent='$id' ORDER BY date ASC
i get the error: Unknown column 'parent' in 'where clause'
Why is it giving me this error? I can insert data into this column without any problems. but selecting stuff i get this error. it doesn't make sense!