Is this query OK? I want to introduce datas in one filr of the table:
$sql = "INSERT INTO Ciudad WHERE (Nombreciudad='$Localidad') ( du_acceso, de_acceso, ing_acceso)" . "VALUES ('$du_acceso', '$de_acceso', '$ing_acceso')";
WHERE statements are useless when inserting. Think, if you're inserting a new row, there's nothing to look for, so WHERE does nothing. Maybe you want to UPDATE instead?
You need FROM ______ and the _ would be the name of the table
INSERT FROM a table? Maybe you guys should look up the syntax of insert queries....
http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#INSERT
According to the SQL 92 spec, you can do this:
insert into table select * from table;
And since MySQL supports subselects now, that should work.
True, true, but I don't think that's the case here....
http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#INSERT_SELECT
says it should work.
Yeah, but from the look of the original post, it doesn't look like a Insert/Select situation. Only the original poster knows...