// Remove bad _SQL_USE_SLAVE_ uses + normalize Db->executeS(), Db->execute() and Db->numRows() names
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9178 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -31,19 +31,19 @@ class PSCDisposition
|
||||
|
||||
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 PSCDisposition
|
||||
|
||||
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 PSCDisposition
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user