Fixed the reason for a waring

This commit is contained in:
Loïc Chapeaux
2001-05-20 18:13:53 +00:00
parent dfa57ed7d8
commit 3001b6dded

View File

@@ -449,9 +449,9 @@ function get_table_def($db, $table, $crlf)
$result = mysql_db_query($db, "SHOW KEYS FROM $table") or mysql_die(); $result = mysql_db_query($db, "SHOW KEYS FROM $table") or mysql_die();
while($row = mysql_fetch_array($result)) while($row = mysql_fetch_array($result))
{ {
$kname=$row['Key_name']; $kname=$row['Key_name'];
$comment=$row['Comment']; $comment=(isset($row['Comment'])) ? $row['Comment'] : '';
$sub_part=$row['Sub_part']; $sub_part=(isset($row['Sub_part'])) ? $row['Sub_part'] : '';
if(($kname != "PRIMARY") && ($row['Non_unique'] == 0)) if(($kname != "PRIMARY") && ($row['Non_unique'] == 0))
$kname="UNIQUE|$kname"; $kname="UNIQUE|$kname";
@@ -678,13 +678,16 @@ function split_sql_file($sql, $delimiter) {
} }
// Remove # type remarks from large sql files // Remove # type remarks from large sql files
// Version 2 18th May 2001 - Last Modified By Pete Kelly // Version 3 20th May 2001 - Last Modified By Pete Kelly
function remove_remarks($sql) { function remove_remarks($sql) {
$i = 0; $i = 0;
while($i < strlen($sql)) { while ($i < strlen($sql)) {
if($sql[$i] == "#" and ($sql[$i-1] == "\n" or $i==0)) { if ($sql[$i] == "#" and ($sql[$i-1] == "\n" or $i==0)) {
$j=1; $j=1;
while($sql[$i+$j] != "\n") $j++; while ($sql[$i+$j] != "\n") {
$j++;
if ($j+$i > strlen($sql)) break;
}
$sql = substr($sql,0,$i) . substr($sql,$i+$j); $sql = substr($sql,0,$i) . substr($sql,$i+$j);
} }
$i++; $i++;
@@ -693,6 +696,7 @@ function remove_remarks($sql) {
} }
// Bookmark Support // Bookmark Support
function get_bookmarks_param() { function get_bookmarks_param() {
global $cfgServers; global $cfgServers;