Page 1 of 1

Is this query OK?

Posted: Mon Jan 05, 2004 11:17 am
by Perfidus
Is this query OK?
I want to introduce datas in one filr of the table:

Code: Select all

$sql = "INSERT INTO Ciudad WHERE (Nombreciudad='$Localidad') ( du_acceso, de_acceso, ing_acceso)" .   
"VALUES ('$du_acceso', '$de_acceso', '$ing_acceso')";

Posted: Mon Jan 05, 2004 12:07 pm
by Weirdan
no, insert does not take WHERE clause. Are you looking for UPDATE?

Posted: Mon Jan 05, 2004 4:09 pm
by Perfidus
Yes, why not?
If it works...
How does it look like?
I can check the manual anyway, thanks!

Posted: Mon Jan 05, 2004 5:47 pm
by mwong
Yeh...Insert is to insert a NEW row. There can't be a condition for that. UPDATE is probably what you're looking for