Forum Moderators: open

Message Too Old, No Replies

MySQL/PHP error:Operand should contain 1 column(s)

I don't understand this

         

beniro

6:06 pm on Jun 14, 2006 (gmt 0)

10+ Year Member



Hello. I'm currently running this query on a MySQL DB from a PHP page:

SELECT * FROM table_name WHERE (EMAIL='email@domain.com', password='password');

And it gives me this error:

Operand should contain 1 column(s)

What does this mean, exactly? I've searched google, but the pages go way over my head, it seems. I'm trying to return all the columns...like 15 total of this unique row. How can I fix this? Any help at all would be greatly appreciated.

beniro

6:11 pm on Jun 14, 2006 (gmt 0)

10+ Year Member



After I wrote this, I realized the answer...I have to use "AND"...

AND...my SQL abilities are rusted almost beyond repair:

SELECT * FROM table_name WHERE (EMAIL='email@domain.com' AND password='password');

Thanks. :)

coopster

2:26 am on Jun 18, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Glad you got it sorted beniro. And welcome to WebmasterWorld ;)