900 ) { $update = @mysql_query( "UPDATE `events` SET `message`='" . time() . "' WHERE `id`='{$restock['id']}'" ); //delete the old items while ( $shops = @mysql_fetch_array( $get_shops, MYSQL_ASSOC ) ) { $delete = @mysql_query( "DELETE FROM `user_items` WHERE `place`='shop_{$shops['id']}'" ); } while ( $items = @mysql_fetch_array( $get_items, MYSQL_ASSOC ) ) { $random = mt_rand( 1, $items['rarity'] ); if ( $random == 1 ) { $make = @mysql_query( "INSERT INTO `user_items` (`name`, `place`) VALUES ('{$items['name']}', '{$items['place']}')" ); } } } ?>