Convert to mysqli
This commit converts all mysql_* function to the appropriate counterparts in mysqli. I used this tool for most of it: https://github.com/philip/MySQLConverterTool This makes it possible to continue using MysqlDumper with PHP 7.0
Dieser Commit ist enthalten in:
Ursprung
dd0e8aede7
Commit
5b995d339d
23 geänderte Dateien mit 210 neuen und 214 gelöschten Zeilen
|
|
@ -4,10 +4,10 @@ if (!defined('MSD_VERSION')) die('No direct access.');
|
|||
$sql='SHOW TABLES FROM `'.$db.'`';
|
||||
$tables=ARRAY();
|
||||
$link=MSD_mysql_connect();
|
||||
$res=mysql_query($sql,$link);
|
||||
$res=mysqli_query($link, $sql);
|
||||
if (!$res===false)
|
||||
{
|
||||
WHILE ($row=mysql_fetch_array($res,MYSQL_NUM))
|
||||
WHILE ($row=mysqli_fetch_array($res, MYSQLI_NUM))
|
||||
{
|
||||
$tables[]=$row[0];
|
||||
}
|
||||
|
|
@ -70,12 +70,12 @@ function mysql_search($db, $tabelle, $suchbegriffe, $suchart, $offset=0, $anzahl
|
|||
|
||||
// Felder ermitteln
|
||||
$sql='SHOW COLUMNS FROM `'.$db.'`.`'.$tables[$tabelle].'`';
|
||||
$res=mysql_query($sql,$link);
|
||||
$res=mysqli_query($link, $sql);
|
||||
unset($felder);
|
||||
if (!$res===false)
|
||||
{
|
||||
// Felder der Tabelle ermitteln
|
||||
WHILE ($row=mysql_fetch_object($res))
|
||||
WHILE ($row=mysqli_fetch_object($res))
|
||||
{
|
||||
$felder[]=$row->Field;
|
||||
}
|
||||
|
|
@ -130,10 +130,10 @@ function mysql_search($db, $tabelle, $suchbegriffe, $suchart, $offset=0, $anzahl
|
|||
else
|
||||
$sql='SELECT * FROM `'.$db.'`.`'.$tables[$tabelle].'` LIMIT '.$offset.','.$anzahl_ergebnisse;
|
||||
|
||||
$res=@mysql_query($sql,$link);
|
||||
$res=@mysqli_query($link, $sql);
|
||||
if ($res)
|
||||
{
|
||||
WHILE ($row=mysql_fetch_array($res,MYSQL_ASSOC))
|
||||
WHILE ($row=mysqli_fetch_array($res, MYSQLI_ASSOC))
|
||||
{
|
||||
//Treffer markieren
|
||||
foreach ($row as $key=>$val)
|
||||
|
|
|
|||
Laden …
Tabelle hinzufügen
Einen Link hinzufügen
In neuem Issue referenzieren