Visa ett inlägg
Oläst 2009-06-21, 11:55 #10
tommi tommi är inte uppkopplad
Medlem
 
Reg.datum: Jul 2008
Inlägg: 121
tommi tommi är inte uppkopplad
Medlem
 
Reg.datum: Jul 2008
Inlägg: 121
Nej det finns ingen cron men hittade en fil om heter cleanup.php kan denna ha något med detta göra? Kolla den nedan!

<?

include 'dbcon.php';



$result = mysql_query("SELECT * FROM `inventory` ORDER BY `userid` DESC");

$howmanytotal = mysql_num_rows($result);



while($line = mysql_fetch_array($result, MYSQL_ASSOC)) {



$result2 = mysql_query("SELECT * FROM `inventory` WHERE `userid` = '".$line['userid']."' AND `itemid` = '".$line['itemid']."'");

$howmanyrows = mysql_num_rows($result2);

$worked2 = mysql_fetch_array($result2);

if ($howmanyrows>0) {

$result3= mysql_query("INSERT INTO `newinventory` (userid, itemid, quantity)"."VALUES ('".$line['userid']."', '".$line['itemid']."', '".$howmanyrows."')");

$result4 = mysql_query("DELETE FROM `inventory` WHERE `userid` = '".$line['userid']."' AND `itemid` = '".$line['itemid']."'");



}



}



?>
tommi är inte uppkopplad