Register

Here are combinations about different queries I found in old plugins.  Some time past and I wasn't able to remember how to replace them again. So now I note any combination I find.

$query = @mysql_query("SELECT game_id FROM ".MPREFIX."arcade_favourites WHERE user_id=".USERID."");
$checkfavs = mysql_fetch_assoc($query);

replace:

$sql->gen("...");
$checkfavs = $sql->fetch('assoc');
$sql->mySQLresult = @mysql_query("SELECT ...");
$rows = $sql->db_Rows();

replace:

$rows = $sql->gen("...");
$sql->mySQLresult = @mysql_query("SELECT SUM(duration) as dur FROM ".MPREFIX."arcade_scores WHERE game_id='".$_POST['gameid']."' and user_id = ".$result['user_id']."");
$duration = $sql->db_Fetch();

replace:

$sql->gen("...");
$duration = $sql->fetch();
$sql->mySQLresult = @mysql_query("UPDATE ".MPREFIX."arcade_games SET times_played = times_played   1 WHERE game_id = '".intval($_POST['gameid'])."';");
$sendpm = mysql_query("INSERT INTO ".MPREFIX."private_msg (pm_id, pm_from, pm_to, pm_sent, pm_read, pm_subject, pm_text, pm_sent_del, pm_read_del, pm_attachments, pm_option, pm_size) VALUES('0', '".USERID."', '".$row['user_id']."', '".intval(time())."', '0', 'Arcade Challenge Recieved!', '".$msg."', '1', '0', '', '', '".intval($size)."' ) ");

replace:

$sql->gen("..."); 
$sendpm = $sql->gen("...");
$class = @mysql_query("SELECT * FROM ".MPREFIX."arcade_categories WHERE cat_id='".$row['cat_id']."'");
$class = mysql_fetch_array($class);

replace:

$class = $sql->retrieve("...");

Discussion

Loading...