Jump to content

UPDATE error


forumnz

Recommended Posts

I get this error:

An error has ocured: 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 'SET position = 'Manager', SET email = '[email protected]', SET business_name = '' at line 1:1064

 

 

Code:

<?php
include('connectdb.php');

$query = "UPDATE fflists SET name = '$name', SET position = '$position', SET email = '$email', SET business_name = '$bname', SET keywords = '$keywords', SET ph = '$ph', SET fax = '$fax', SET url = '$url', SET murl = '$murl', SET disph = '$disph', SET disadd = '$disadd', SET disfax = '$disfax', SET disurl = '$disurl', SET dismurl = '$dismurl', SET disemail = '$disemail', SET c1 = '$c1', SET c2 = '$c2', SET c3  = '$c3', SET c4  = '$c4', SET c5 = '$c5', SET dcr = '$dcr', SET add1 = '$add1', SET add2 = '$add2', SET add3 = '$add3', SET add4 = '$add4', SET map = '$map', SET openhrs = '$openhrs', SET prk_os = '$pos', SET prk_ofs = '$pofs', SET prk_pos = '$ppos', SET p_pofs = '$ppofs', SET dbld = '$dbld', SET pay_chk = '$cheque', SET pay_eft = '$eft', SET pay_visa = '$visa', SET pay_amex = '$amex', SET pay_mstr = '$mstr', SET pay_dnrs = '$dnrs', SET pay_cash = '$cash', SET f_busdin = '$busdin', SET f_chldmen = '$chldmen', SET f_conf = '$conf', SET f_glutfree = '$glutfree', SET f_view = '$view', SET f_livemus = '$livmus', SET f_cat = '$cat', SET f_chldplay = '$chldplay', SET f_prvdin = '$prvdin', SET f_prvfunc = '$prvfunc', SET f_prvpart = '$prvpart', SET f_rmtdin = '$rmtdin', SET f_wedfnc = '$wedfnc', SET f_vege = '$vege', SET seatcap = '$seatcap', SET goodkids = '$goodkids', SET reserv = '$reserve', SET deliver = '$deliver', SET takeaway = '$takeaway', SET otdrseat = '$otdrseat', SET dresc = '$dresc', SET liqul = '$liqul', SET comment = '$comment' WHERE id='$id'"; 

$result = mysql_query($query) or die( "An error has ocured: " .mysql_error (). ":" .mysql_errno ()); 


?>

 

What could be the problem?

 

Thanks,

Sam.

Link to comment
https://forums.phpfreaks.com/topic/89080-update-error/
Share on other sites

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.