TheMayhem
08-09-2004, 12:25 PM
There is this font hack posted on vb.org, and I'm trying to customize it so that when you edit it, it's on a seperate page rather then the profile or options page. Anyways I have everything working now but the sql query and was hoping some of the brains here could show me what I am doing wrong with how I have written this query.
if ($_POST['do'] == 'updatefont')
{
echo "Updating font";
globalize($_POST, array('font' => STR));
// Support tags HTML grog6
$font = strip_tags($font);
$DB_site->query("
UPDATE " . TABLE_PREFIX . "user SET
font = '" . addslashes($font) ."',
WHERE userid = $bbuserinfo[userid]
");
$url = "usercp.php?$session[sessionurl]";
eval(print_standard_redirect('redirect_updatethank s'));
}
That will give me this wonderful error....
Database error in vBulletin 3.0.3:
Invalid SQL:
UPDATE user SET
font = 'XXX',
WHERE userid = 17690
mysql error: 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 'WHERE userid = 17690' at line 3
mysql error number: 1064
If this is in the wrong forum my apologies... please move it to the correct forum, thanks :)
if ($_POST['do'] == 'updatefont')
{
echo "Updating font";
globalize($_POST, array('font' => STR));
// Support tags HTML grog6
$font = strip_tags($font);
$DB_site->query("
UPDATE " . TABLE_PREFIX . "user SET
font = '" . addslashes($font) ."',
WHERE userid = $bbuserinfo[userid]
");
$url = "usercp.php?$session[sessionurl]";
eval(print_standard_redirect('redirect_updatethank s'));
}
That will give me this wonderful error....
Database error in vBulletin 3.0.3:
Invalid SQL:
UPDATE user SET
font = 'XXX',
WHERE userid = 17690
mysql error: 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 'WHERE userid = 17690' at line 3
mysql error number: 1064
If this is in the wrong forum my apologies... please move it to the correct forum, thanks :)