PDA

View Full Version : Help with this simple code :/


zardos
11-20-2007, 04:16 AM
Hi, this is a plug-in i wrote and entered into the, registration-verified hook
I cant get this to work, and yes minvtes do exist in the user table.

Plz help.



$vbulletin->$db->query_write("UPDATE " . TABLE_PREFIX . "user SET minvites='minvites + 1' WHERE userid = " . $userinfo['referrerid'] . " LIMIT 1");

briansol
11-20-2007, 04:41 AM
you can't ADD on a string.

'minvites + 1' is incorrect.

minvites should be an int/float field (not a varchar) and there should be no quotes around it

Guest190829
11-20-2007, 05:03 AM
Also it's:


$vbulletin->db->query_write();


Not


$vbulletin->$db->query_write();