Jump to content

why wont these queries run?


seany123

Recommended Posts

i have this code:

 

//UNIQUE REFERRER LINK.
if ($_GET['ref']){

$refq = $db->execute("SELECT * FROM referral WHERE user_id=? && ip='$ip'", array($_GET['id']));
$refqcount = $refq->recordcount();

if($refqcount <= 0)
{
//UPDATE REFERRAL PLAYER AND REFERRAL TABLE
$updateref = $db->execute("insert `referral` set `user_id`=?, `ip`='$ip'", array($_GET['id']));
$updateuser = $db->execute("update `users` SET `money`=`money`+? WHERE `id`=?", array(50, $_GET['id']));
}
}

 

but for some reason the updateref an updateuser queries dont run.

 

so im thinking i have done something wrong?

Link to comment
https://forums.phpfreaks.com/topic/189769-why-wont-these-queries-run/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.