* $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 *
$id = bigintval($id);
// Save entry
- SQL_QUERY_ESC("UPDATE
+ sqlQueryEscaped("UPDATE
`{?_MYSQL_PREFIX?}_sponsor_paytypes`
SET
`pay_name`='%s',
// Remove entries here...
foreach (postRequestElement('id') as $id => $sel) {
// Remove entry
- SQL_QUERY_ESC('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` WHERE `id`=%s LIMIT 1',
+ sqlQueryEscaped('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` WHERE `id`=%s LIMIT 1',
array(bigintval($id)), __FILE__, __LINE__);
}
if (isFormSent('add')) {
// Check if entry with same name does exists
- $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` WHERE `pay_name`='%s' LIMIT 1",
+ $result = sqlQueryEscaped("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` WHERE `pay_name`='%s' LIMIT 1",
array(postRequestElement('pay_name')), __FILE__, __LINE__);
- if (SQL_HASZERONUMS($result)) {
+ if (ifSqlHasZeroNums($result)) {
// No entry found so add this line
- SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_paytypes` (`pay_name`, `pay_rate`, `pay_min_count`, `pay_currency`) VALUES ('%s','%s','%s','%s')",
+ sqlQueryEscaped("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_paytypes` (`pay_name`, `pay_rate`, `pay_min_count`, `pay_currency`) VALUES ('%s','%s','%s','%s')",
array(
postRequestElement('pay_name'),
convertCommaToDot(postRequestElement('pay_rate')),
}
// Free memory
- SQL_FREERESULT($result);
+ sqlFreeResult($result);
// Output message
displayMessage($message);
$OUT = '';
foreach (postRequestElement('id') as $id => $sel) {
// Load entry
- $result = SQL_QUERY_ESC("SELECT `id`, `pay_name`, `pay_rate`, `pay_min_count`, `pay_currency` FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` WHERE `id`=%s LIMIT 1",
+ $result = sqlQueryEscaped("SELECT `id`, `pay_name`, `pay_rate`, `pay_min_count`, `pay_currency` FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` WHERE `id`=%s LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 1) {
+ if (sqlNumRows($result) == 1) {
// Load data
- $content = SQL_FETCHARRAY($result);
+ $content = sqlFetchArray($result);
if (isFormSent('edit')) {
// Edit entry
}
// Free result
- SQL_FREERESULT($result);
+ sqlFreeResult($result);
} // END - foreach
// Load main template depending on mode (edit/delete)
}
} else {
// Load all payment types
- $result = SQL_QUERY('SELECT
+ $result = sqlQuery('SELECT
`id`,
`pay_name`,
`pay_rate`,
__FILE__, __LINE__);
// Are there some payment types setup?
- if (!SQL_HASZERONUMS($result)) {
+ if (!ifSqlHasZeroNums($result)) {
// Prepare variables for listing
$OUT = '';
// List alle found payment types
- while ($content = SQL_FETCHARRAY($result)) {
+ while ($content = sqlFetchArray($result)) {
// Add row
$OUT .= loadTemplate('admin_list_sponsor_pay_row', TRUE, $content);
} // END - while
}
// Free memory
- SQL_FREERESULT($result);
+ sqlFreeResult($result);
// Load final template
loadTemplate('admin_sponsor_paytypes', FALSE, $content);