Forum Moderators: coopster
I wanted to perform a search on a database using an input form object with the name d_user. I also created a field in the database named user and placed in the following data- 1101 and abcd. It's declared as VARCHAR(10).
However, when the query was performed using abcd, I got the error:
Error performing query: Unknown column 'abcd' in 'where clause'
But when I used 1101, it went through without a hitch.
I hope my question is clear enough.
Thanks for the help.
mysql_query("SELECT * FROM going_db where id_name='$id_name'");
I would think that is why the 1101 is working int values don't need quotes around them. Interesting that it wouldn't error out selecting an int against a varchar col though.