forumnz Posted February 2, 2008 Share Posted February 2, 2008 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 = 'sam@netport.co.nz', 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. Quote Link to comment https://forums.phpfreaks.com/topic/89080-update-error/ Share on other sites More sharing options...
The Little Guy Posted February 2, 2008 Share Posted February 2, 2008 you only need SET in there one time (the first time). Quote Link to comment https://forums.phpfreaks.com/topic/89080-update-error/#findComment-456248 Share on other sites More sharing options...
PHPoracle Posted February 2, 2008 Share Posted February 2, 2008 Put the SET column1 = this value, column2 = this value ...ETC Quote Link to comment https://forums.phpfreaks.com/topic/89080-update-error/#findComment-456274 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.