foreach
This commit is contained in:
@@ -280,8 +280,7 @@ function PMA_getTableComments($db, $table, $crlf, $do_relation = false, $do_comm
|
|||||||
|
|
||||||
if (isset($comments_map) && count($comments_map) > 0) {
|
if (isset($comments_map) && count($comments_map) > 0) {
|
||||||
$schema_create .= $crlf . '#' . $crlf . '# COMMENTS FOR TABLE ' . PMA_backquote($table, $use_backquotes) . ':' . $crlf;
|
$schema_create .= $crlf . '#' . $crlf . '# COMMENTS FOR TABLE ' . PMA_backquote($table, $use_backquotes) . ':' . $crlf;
|
||||||
@reset($comments_map);
|
foreach($comments_map AS $comment_field => $comment) {
|
||||||
while(list($comment_field, $comment) = each($comments_map)) {
|
|
||||||
$schema_create .= '# ' . PMA_backquote($comment_field, $use_backquotes) . $crlf . '# ' . PMA_backquote($comment, $use_backquotes) . $crlf;
|
$schema_create .= '# ' . PMA_backquote($comment_field, $use_backquotes) . $crlf . '# ' . PMA_backquote($comment, $use_backquotes) . $crlf;
|
||||||
}
|
}
|
||||||
$schema_create .= '#' . $crlf;
|
$schema_create .= '#' . $crlf;
|
||||||
@@ -290,7 +289,7 @@ function PMA_getTableComments($db, $table, $crlf, $do_relation = false, $do_comm
|
|||||||
if (isset($mime_map) && count($mime_map) > 0) {
|
if (isset($mime_map) && count($mime_map) > 0) {
|
||||||
$schema_create .= $crlf . '#' . $crlf . '# MIME TYPES FOR TABLE ' . PMA_backquote($table, $use_backquotes) . ':' . $crlf;
|
$schema_create .= $crlf . '#' . $crlf . '# MIME TYPES FOR TABLE ' . PMA_backquote($table, $use_backquotes) . ':' . $crlf;
|
||||||
@reset($mime_map);
|
@reset($mime_map);
|
||||||
while(list($mime_field, $mime) = each($mime_map)) {
|
foreach($mime_map AS $mime_field => $mime) {
|
||||||
$schema_create .= '# ' . PMA_backquote($mime_field, $use_backquotes) . $crlf . '# ' . PMA_backquote($mime['mimetype'], $use_backquotes) . $crlf;
|
$schema_create .= '# ' . PMA_backquote($mime_field, $use_backquotes) . $crlf . '# ' . PMA_backquote($mime['mimetype'], $use_backquotes) . $crlf;
|
||||||
}
|
}
|
||||||
$schema_create .= '#' . $crlf;
|
$schema_create .= '#' . $crlf;
|
||||||
@@ -298,8 +297,7 @@ function PMA_getTableComments($db, $table, $crlf, $do_relation = false, $do_comm
|
|||||||
|
|
||||||
if ($have_rel) {
|
if ($have_rel) {
|
||||||
$schema_create .= $crlf . '#' . $crlf . '# RELATIONS FOR TABLE ' . PMA_backquote($table, $use_backquotes) . ':' . $crlf;
|
$schema_create .= $crlf . '#' . $crlf . '# RELATIONS FOR TABLE ' . PMA_backquote($table, $use_backquotes) . ':' . $crlf;
|
||||||
@reset($res_rel);
|
foreach($res_rel AS $rel_field => $rel) {
|
||||||
while(list($rel_field, $rel) = each($res_rel)) {
|
|
||||||
$schema_create .= '# ' . PMA_backquote($rel_field, $use_backquotes) . $crlf . '# ' . PMA_backquote($rel['foreign_table'], $use_backquotes) . ' -> ' . PMA_backquote($rel['foreign_field'], $use_backquotes) . $crlf;
|
$schema_create .= '# ' . PMA_backquote($rel_field, $use_backquotes) . $crlf . '# ' . PMA_backquote($rel['foreign_table'], $use_backquotes) . ' -> ' . PMA_backquote($rel['foreign_field'], $use_backquotes) . $crlf;
|
||||||
}
|
}
|
||||||
$schema_create .= '#' . $crlf;
|
$schema_create .= '#' . $crlf;
|
||||||
|
Reference in New Issue
Block a user