// Remove bad _SQL_USE_SLAVE_ uses + normalize Db->executeS(), Db->execute() and Db->numRows() names
This commit is contained in:
@@ -31,19 +31,19 @@ class Disposition
|
||||
|
||||
public static function create($id_cart, $mtid, $amount, $currency)
|
||||
{
|
||||
return Db::getInstance()->Execute(
|
||||
return Db::getInstance()->execute(
|
||||
'INSERT INTO `'._DB_PREFIX_.self::TABLE_NAME.'` (`id_cart`, `mtid`, `amount`, `currency`)
|
||||
VALUES ('.(int)($id_cart).',\''.pSQL($mtid).'\','.(float)($amount).',\''.pSQL($currency).'\')');
|
||||
}
|
||||
|
||||
public static function delete($id)
|
||||
{
|
||||
return Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.self::TABLE_NAME.'` WHERE `id_disposition` = '.(int)($id));
|
||||
return Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.self::TABLE_NAME.'` WHERE `id_disposition` = '.(int)($id));
|
||||
}
|
||||
|
||||
public static function deleteByCartId($id_cart)
|
||||
{
|
||||
return Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.self::TABLE_NAME.'` WHERE `id_cart` = '.(int)($id_cart));
|
||||
return Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.self::TABLE_NAME.'` WHERE `id_cart` = '.(int)($id_cart));
|
||||
}
|
||||
|
||||
public static function getByCartId($id_cart)
|
||||
@@ -53,7 +53,7 @@ class Disposition
|
||||
|
||||
public static function createTable()
|
||||
{
|
||||
return Db::getInstance()->Execute(
|
||||
return Db::getInstance()->execute(
|
||||
'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.self::TABLE_NAME.'` (
|
||||
`id_disposition` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`id_cart` int(11) NOT NULL,
|
||||
@@ -67,12 +67,12 @@ class Disposition
|
||||
|
||||
public static function dropTable()
|
||||
{
|
||||
return Db::getInstance()->Execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.self::TABLE_NAME.'`');
|
||||
return Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.self::TABLE_NAME.'`');
|
||||
}
|
||||
|
||||
public static function updateAmount($id_disposition, $amount)
|
||||
{
|
||||
return Db::getInstance()->Execute(
|
||||
return Db::getInstance()->execute(
|
||||
'UPDATE `'._DB_PREFIX_.self::TABLE_NAME.'` SET `amount` = `amount` - '.(float)($amount).' WHERE `id_disposition` = '.(int)($id_disposition));
|
||||
}
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ abstract class PrepaidServices extends PaymentModule
|
||||
private function _getAllowedCurrencies()
|
||||
{
|
||||
if (empty($this->allowed_currencies))
|
||||
$this->allowed_currencies = DB::getInstance()->ExecuteS(
|
||||
$this->allowed_currencies = DB::getInstance()->executeS(
|
||||
'SELECT c.id_currency, c.iso_code, c.name, c.sign
|
||||
FROM '._DB_PREFIX_.'currency c
|
||||
WHERE c.deleted = 0
|
||||
|
||||
Reference in New Issue
Block a user