this is my code.
// here if no ID then adding else we're editing
if ($id) {
$sql = "UPDATE $table_name
SET coname='$coname', acctnum='$acctnum', username='$username', contact='$contact', phone='$phone', url='$url'
WHERE id=$id";
$sql2 = "UPDATE $table_name2
SET custid='$custid', faq='$faq', education='$education', sitelinks='$sitelinks', footer='$footer', employment='$employment', pressrel='$pressrel', whatsnew='$whatsnew', groupware='$groupware', webcalendar='$webcalendar', personalcalendar='$personalcalendar', groupcalendar='$groupcalendar', projectcalendar='$projectcalendar', giffiles='$giffiles', pdffiles='$pdffiles', audiofiles='$audiofiles', videofiles='$videofiles', ppfiles='$ppfiles', inventory='$inventory'
WHERE custid = $custid";
}
// run SQL against the DB
$result = mysql_query($sql,$connection);
$result2 = mysql_query($sql2,$connection) or die(mysql_errno());
echo "Record updated/edited!<p>";
First query works perfectly, second doesn't, same database, different table. It is giving me this error: 1064, mysql_error() shows: You have an error in your SQL syntax near '' at line 3
Any ideas will be appreciated, I am getting bleary eyed looking at it.
moonie 😉