1054 - Unknown column 'apa_calda' in 'where clause'
- by sebastian
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