Board index   FAQ   Search  
Register  Login
Board index php forum :: Database mySQL & php coding

More update troubles

Codes here !

Moderators: macek, egami, gesf

More update troubles

Postby Joel » Mon Apr 07, 2003 11:25 pm

$sql = "UPDATE `shows` SET `date` = '$date', `bands` = 'bands', `venue` = 'venue', `other` = 'other' WHERE `date` = '$date'";
$result = mysql_query($sql) or die(mysql_error());


This is not working, I have pretty much the same code working in another page, I think maybe it could be to do with MySql 4, as I haven't run the script to set the priveleges correct (as I dont know how) but I have it working on another page. My insert code isn't working either, but delete is.
Joel
New php-forum User
New php-forum User
 
Posts: 193
Joined: Sat Mar 29, 2003 11:57 pm
Location: Auckland, New Zealand

Postby bezmond » Tue Apr 08, 2003 9:21 am

Code: Select all
$sql = "UPDATE `shows` SET date= '$date', bands=$bands, venue= '$venue', other='$other' WHERE `date` = '$date'";
$result = mysql_query($sql) or die(mysql_error());


try that. You were missing a lot of $ signs.

Andrew
User avatar
bezmond
Moderator
Moderator
 
Posts: 312
Joined: Sat Apr 05, 2003 4:33 am
Location: Mansfield, UK


Return to mySQL & php coding

Who is online

Users browsing this forum: Google [Bot] and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.