Jump to content

[SOLVED] trying to replace entries in the db...


ardyandkari

Recommended Posts

i want to replace the number of people ($people) allowed in a specific camp site ($site).

this is my code:

<?php
$sql = "UPDATE `resort`.`cabins` SET `people` = ".$people." WHERE `cabins`.`number` = ".$site.";";
?>

 

it comes up with the following error:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

 

what is wrong with the formatting of the mysql query?  i copied this from phpmyadmin and removed some extraneous text (utf encoding, etc.)...

 

 

thanks in advance...

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.