'InnoDB', 'page' => 'Status')). '">' . __('Details...') . ')'; } else { $error = '#' . ((string) $error_number) . ' - ' . $error_message; } return $error; } function PMA_DBI_num_rows($result) { if (!is_bool($result)) { return mysql_num_rows($result); } else { return 0; } } function PMA_DBI_insert_id($link = null) { if (empty($link)) { if (isset($GLOBALS['userlink'])) { $link = $GLOBALS['userlink']; } else { return false; } } // If the primary key is BIGINT we get an incorrect result // (sometimes negative, sometimes positive) // and in the present function we don't know if the PK is BIGINT // so better play safe and use LAST_INSERT_ID() // return PMA_DBI_fetch_value('SELECT LAST_INSERT_ID();', 0, 0, $link); } /** * returns the number of rows affected by last query * * @uses $GLOBALS['userlink'] * @uses mysql_affected_rows() * @param object mysql $link the mysql object * @param boolean $get_from_cache * @return string integer */ function PMA_DBI_affected_rows($link = null, $get_from_cache = true) { if (empty($link)) { if (isset($GLOBALS['userlink'])) { $link = $GLOBALS['userlink']; } else { return false; } } if ($get_from_cache) { return $GLOBALS['cached_affected_rows']; } else { return mysql_affected_rows($link); } } /** * @todo add missing keys like in from mysqli_query (decimals) */ function PMA_DBI_get_fields_meta($result) { $fields = array(); $num_fields = mysql_num_fields($result); for ($i = 0; $i < $num_fields; $i++) { $field = mysql_fetch_field($result, $i); $field->flags = mysql_field_flags($result, $i); $field->orgtable = mysql_field_table($result, $i); $field->orgname = mysql_field_name($result, $i); $fields[] = $field; } return $fields; } function PMA_DBI_num_fields($result) { return mysql_num_fields($result); } function PMA_DBI_field_len($result, $i) { return mysql_field_len($result, $i); } function PMA_DBI_field_name($result, $i) { return mysql_field_name($result, $i); } function PMA_DBI_field_flags($result, $i) { return mysql_field_flags($result, $i); } ?>