// Check if at least one table with same prefix already exists in new installer

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12194 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2012-01-05 14:28:10 +00:00
parent 4ab6988b63
commit 9d7ec6da61
5 changed files with 93 additions and 2 deletions
+27
View File
@@ -601,20 +601,47 @@ abstract class DbCore
return call_user_func_array(array(Db::getClass(), 'tryUTF8'), array($server, $user, $pwd));
}
/**
* Try a connection to the database and check if at least one table with same prefix exists
*
* @param string $server Server address
* @param string $user Login for database connection
* @param string $pwd Password for database connection
* @param string $db Database name
* @param string $prefix Tables prefix
* @return bool
*/
public static function hasTableWithSamePrefix($server, $user, $pwd, $db, $prefix)
{
return call_user_func_array(array(Db::getClass(), 'hasTableWithSamePrefix'), array($server, $user, $pwd, $db, $prefix));
}
/**
* @deprecated 1.5.0
*/
public static function s($sql, $use_cache = true)
{
Tools::displayAsDeprecated();
return Db::getInstance()->executeS($sql, true, $use_cache);
}
/**
* @deprecated 1.5.0
*/
public static function ps($sql, $use_cache = 1)
{
Tools::displayAsDeprecated();
$ret = Db::s($sql, $use_cache);
p($ret);
return $ret;
}
/**
* @deprecated 1.5.0
*/
public static function ds($sql, $use_cache = 1)
{
Tools::displayAsDeprecated();
Db::s($sql, $use_cache);
die();
}