Datuve :: Forums :: Arhīvs :: Mysql Error Unknown column 'xxxx' in 'where clause'

Datuve

Mana Datuve

Reģistrācija | Noteikumi | Paroles atjaunošana



Forums

Ieskaties


Raksti

Lietotāji online

Lietotāji online: 88

Reģistrētie lietotāji online: 0

Viesi online: 88

Datuve.lv video
Top.LV

Mysql Error Unknown column 'xxxx' in 'where clause'

Ievietoja: SharkyLV @ 2007.07.23 00:03  

Tātad taisu SMS skriptu..


if ($_POST['code']) {
begin_frame1("SMS");

$res2 = mysql_query("SELECT code, used FROM smscode WHERE used=0 AND code=$_POST[code]") or sqlerr();
while ($arr2 = mysql_fetch_assoc($res2))
{
if ($_POST['code'] == $arr2['code']) {

echo "ok";
} else {
echo "bad";
}
end_frame();
die;
}
}

Nu un man raada to Unknown column 'xxxx' in 'where clause'
Sapratu tas ir tā code=$_POST[code] vaina..

vrb nepareizi daru..

man vajag lai query pārbauda vai table ir ierakstītais kods.