PMA_DBI_insert_id

This commit is contained in:
Marc Delisle
2004-01-20 20:52:28 +00:00
parent 5398bb666e
commit a69eb2ebbc
6 changed files with 21 additions and 5 deletions

View File

@@ -171,7 +171,11 @@ function PMA_DBI_close($link = '') {
function PMA_DBI_get_dblist($link = '') {
if (empty($link)) {
$link = $GLOBALS['userlink'];
if (isset($GLOBALS['userlink'])) {
$link = $GLOBALS['userlink'];
} else {
return FALSE;
}
}
$res = PMA_DBI_try_query('SHOW DATABASES;', $link);
$dbs_array = array();
@@ -198,4 +202,15 @@ function PMA_DBI_num_rows($result) {
return mysql_num_rows($result);
}
function PMA_DBI_insert_id($link) {
if (empty($link)) {
if (isset($GLOBALS['userlink'])) {
$link = $GLOBALS['userlink'];
} else {
return FALSE;
}
}
return mysql_insert_id($link);
}
?>