}
// Reset variables
-$cnt2 = 0; $lastSentId = 0; $cnt_back = array(0); $pointsBack = array(0);
+$cnt2 = '0'; $lastSentId = '0'; $cnt_back = array(0); $pointsBack = array(0);
if (SQL_NUMROWS($result_main) > 0) {
// Parse all mails
while ($DATA = SQL_FETCHARRAY($result_main, 0, false)) {
// If there's no stats entry add it!
//* DEBUG: */ outputHtml("!L:".__LINE__.'/'.SQL_NUMROWS($result_stats)."!<br />");
- if (SQL_NUMROWS($result_stats) == 0) {
+ if (SQL_NUMROWS($result_stats) == '0') {
// No entry was found, so we add him!
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_stats` (`pool_id` , `userid`, `cat_id`, `payment_id`, `subject`, `url` , `max_rec` , `timestamp_ordered`, `timestamp_sstart`) VALUES ('%s','%s','%s','%s','%s','%s','%s','%s' , UNIX_TIMESTAMP())",
array(bigintval($DATA['id']), bigintval($DATA['sender']), bigintval($DATA['cat_id']), bigintval($DATA['payment_id']), $DATA['subject'], $DATA['url'], $DATA['target_send'], bigintval($DATA['timestamp'])), __FILE__, __LINE__);
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_stats` SET `timestamp_send`=UNIX_TIMESTAMP() WHERE `pool_id`=%s LIMIT 1",
array(bigintval($DATA['id'])), __FILE__, __LINE__);
- $lastSentId = $DATA['id']; $GLOBALS['pool_cnt'] = 0;
+ $lastSentId = $DATA['id']; $GLOBALS['pool_cnt'] = '0';
$cnt2 += $GLOBALS['pool_cnt'];
// Update mediadata if version is 0.0.4 or higher
SQL_FREERESULT($result_stats);
} else {
// User does not exists so we have add the sender's points back to sender's account
- if (($RECEIVERS['id'] == 0) || (empty($RECEIVERS['id']))) {
+ if (($RECEIVERS['id'] == '0') || (empty($RECEIVERS['id']))) {
// List was empty
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_pool` SET `data_type`='SEND' WHERE `id`=%s LIMIT 1",
array(bigintval($DATA['id'])), __FILE__, __LINE__);