Question

$sql = "UPDATE 'load' SET 'graphe'=".$graphe."','intersection'='".$intersection."','ville'='".$ville ."' where id= '".$id."'";

I'm using the above after a search and the person said it corrected the syntax. When I run it I get failed.

Thanks

Pete

Was it helpful?

Solution

Change ' to ` AND insert ' before ".$graphe

$sql = "UPDATE `load` SET `graphe`='".$graphe."',`intersection`='".$intersection."',`ville`='".$ville ."' where id='".$id."'";
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top