1054 - Unknown column 'apa_calda' in 'where clause'

Posted by sebastian on Stack Overflow See other posts from Stack Overflow or by sebastian
Published on 2010-05-28T15:40:01Z Indexed on 2010/05/28 15:42 UTC
Read the original article Hit count: 139

Filed under:
|

Hi,

I keep getting this error in mysql. Here is the query:

SELECT user_id FROM detalii_contor WHERE tip_contor=apa_calda

i want to use this query in a php file but it doesn't give any result. so i tried to write it in the sql command prompt. here is what i tried in the php file:

$Q = "SELECT id_contor, den_contor FROM detalii_contor WHERE tip_contor='".$contor."'";

$Q = "SELECT id_contor, den_contor FROM detalii_contor WHERE tip_contor='$contor'";

even without "" or without ''

i wanted to get $contor from a form, i also tried with $_POST['util'] and {$_POST['util']} i've also tried to set $contor the value i need, but no result.

please help.

thanks, Sebastian

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql