// Merge -> revision 7906

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7909 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-08-05 13:26:44 +00:00
parent e4825ac555
commit 239f92eaf1
55 changed files with 174 additions and 1296 deletions

View File

@@ -860,12 +860,12 @@ abstract class ObjectModelCore
* @param $id_entity entity id
* @return boolean
*/
public static function existsInDatabase($id_entity)
public static function existsInDatabase($id_entity, $table)
{
$row = Db::getInstance()->getRow('
SELECT `id_'.self::$table.'`
FROM `'._DB_PREFIX_.self::$table.'` e
WHERE e.`id_'.self::$table.'` = '.(int)($id_entity));
SELECT `id_'.$table.'`
FROM `'._DB_PREFIX_.$table.'` e
WHERE e.`id_'.$table.'` = '.(int)($id_entity));
return isset($row['id_product']);
}