X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fgen_mediadata.php;h=8922660483b0431a3120658c7ed2384c646ee926;hb=5e9e2e145dc720e1459a6f1f51f2a32f1fcc9b6d;hp=02287536bc04c36de34d38e36b9741eef3d9eaa6;hpb=f5e6a0a8acafd76f06f1122b4bdc2dc0f9277aa4;p=mailer.git diff --git a/inc/gen_mediadata.php b/inc/gen_mediadata.php index 02287536bc..8922660483 100644 --- a/inc/gen_mediadata.php +++ b/inc/gen_mediadata.php @@ -18,6 +18,7 @@ * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * + * Copyright (c) 2009, 2010 by Mailer Developer Team * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -39,7 +40,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} +} // END - if // Init variables $bsent = '0'; $bclicks = '0'; $bcount = '0'; @@ -85,14 +86,10 @@ updateMediadataEntry(array('total_clicks', 'bonus_clicks') , 'init', $bclicks); updateMediadataEntry(array('total_orders', 'bonus_orders') , 'init', $bcount); // Aquire total used points -$result = SQL_QUERY('SELECT SUM(`used_points`) AS used_points FROM `{?_MYSQL_PREFIX?}_user_data`', __FILE__, __LINE__); -list($used) = SQL_FETCHROW($result); -SQL_FREERESULT($result); +$used = countSumTotalData('', 'user_data', 'used_points', ''); // ... and total points -$result = SQL_QUERY('SELECT SUM(`points`) AS points FROM `{?_MYSQL_PREFIX?}_user_points`', __FILE__, __LINE__); -list($points) = SQL_FETCHROW($result); -SQL_FREERESULT($result); +$points = countSumTotalData('', 'user_points', 'points', ''); // Update database updateMediadataEntry(array('total_points'), 'init', ($points - $used));