* $Author:: $ *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2012 by Mailer Developer Team *
+ * Copyright (c) 2009 - 2013 by Mailer Developer Team *
* For more information visit: http://mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
} // END - if
// Check for all earnings
-$result = SQL_QUERY('SELECT
- d.`earning_id`,
- d.`earning_group`,
- d.`earning_provider`
+$result = sqlQuery('SELECT
+ `d`.`earning_id`,
+ `d`.`earning_group`,
+ `d`.`earning_provider`
FROM
- `{?_MYSQL_PREFIX?}_earning_data` AS d
+ `{?_MYSQL_PREFIX?}_earning_data` AS `d`
ORDER BY
- d.`earning_sorting` ASC', __FILE__, __LINE__);
+ `d`.`earning_sorting` ASC', __FILE__, __LINE__);
// Are there entries?
-if (!SQL_HASZERONUMS($result)) {
+if (!ifSqlHasZeroNums($result)) {
// Init output
$OUT = '';
// List all entries
- while ($content = SQL_FETCHARRAY($result)) {
+ while ($content = sqlFetchArray($result)) {
// Load user_earning data
- $result2 = SQL_QUERY_ESC('SELECT
- u.`earning_active`,
- UNIX_TIMESTAMP(u.`earning_added`) AS `earning_added`,
- UNIX_TIMESTAMP(u.`earning_canceled`) AS `earning_canceled`,
- u.`earning_daily_amount`,
- u.`earning_points`
+ $result2 = sqlQueryEscaped('SELECT
+ `u`.`earning_active`,
+ UNIX_TIMESTAMP(`u`.`earning_added`) AS `earning_added`,
+ UNIX_TIMESTAMP(`u`.`earning_canceled`) AS `earning_canceled`,
+ `u`.`earning_daily_amount`,
+ `u`.`earning_points`
FROM
- `{?_MYSQL_PREFIX?}_user_earning` AS u
+ `{?_MYSQL_PREFIX?}_user_earning` AS `u`
WHERE
- u.`earning_id`=%s AND
- u.`earning_userid`=%s
+ `u`.`earning_id`=%s AND
+ `u`.`earning_userid`=%s
LIMIT 1',
array(
bigintval($content['earning_id']),
), __FILE__, __LINE__);
// Is there an entry?
- if (SQL_NUMROWS($result2) == 1) {
+ if (sqlNumRows($result2) == 1) {
// Load it
- $content = merge_array($content, SQL_FETCHARRAY($result2));
+ $content = merge_array($content, sqlFetchArray($result2));
} // END - if
// Free result
- SQL_FREERESULT($result2);
+ sqlFreeResult($result2);
// Is there user_earning data available?
if (!isset($content['earning_active'])) {
}
// Free result
-SQL_FREERESULT($result);
+sqlFreeResult($result);
// [EOF]
?>