I have an UPDATE query to edit records in a mysql db. It does not work for some reason. THe code with all of the variables to update is:
$owner = trim($owner);
$owner = addslashes($owner);
$bannerpath = trim($bannerpath);
$bannerpath = addslashes($bannerpath);
$bannerlink = trim($bannerlink);
$bannerlink = addslashes($bannerlink);
$bannerheight = trim($bannerheight);
$bannerheight = addslashes($bannerheight);
$bannerwidth = trim($bannerwidth);
$bannerwidth = addslashes($bannerwidth);
$bannerloc = trim($bannerloc);
$bannerloc = addslashes($bannerloc);
$impressions = trim($impressions);
$impressions = addslashes($impressions);
$impressremain = trim($impressremain);
$impressremain = addslashes($impressremain);
$impresshist = trim($impresshist);
$impresshist = addslashes($impresshist);
$active = trim($active);
$active = addslashes($active);
echo $mode; //All echo statements show values!
echo $owner;
echo $bannerpath;
echo $bannerlink;
echo $bannerloc;
echo $id;
$result = dbquery("UPDATE banners SET owner='$owner', bannerpath='$bannerpath', bannerlink='$bannerlink', bannerheight='$bannerheight', bannerwidth='$bannerwidth', bannerloc='$bannerloc', impressions='$impressions', impressremain='$impressremain', impresshist='$impresshist', active='$active' WHERE bannerid='$id'");
The dbquery function works for other updates so I don't think this is the problem.
All of the echo statements are displaying the correct record info prior to the update.
I know the update is a long statement but a lot of info is in this table.
Thanks,