seany123 Posted January 25, 2010 Share Posted January 25, 2010 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 More sharing options...
Mchl Posted January 25, 2010 Share Posted January 25, 2010 What class $db is? Link to comment https://forums.phpfreaks.com/topic/189769-why-wont-these-queries-run/#findComment-1001457 Share on other sites More sharing options...
seany123 Posted January 25, 2010 Author Share Posted January 25, 2010 $db = &ADONewConnection('mysql'); //Connect to database Link to comment https://forums.phpfreaks.com/topic/189769-why-wont-these-queries-run/#findComment-1001465 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.