' . htmlspecialchars($field["field"]) . '' : "*"), $field);
}
/** Links after select heading
* @param array result of SHOW TABLE STATUS
* @return string
*/
function adminer_select_links($table_status) {
global $SELF;
return call_adminer('select_links', '' . lang('Table structure') . '', $table_status);
}
/** Find backward keys for table
* @param string
* @return array $return[$target_table][$key_name][$target_column] = $source_column;
*/
function adminer_backward_keys($table) {
return call_adminer('backward_keys', array(), $table);
}
/** Query printed in select before execution
* @param string query to be executed
* @return string
*/
function adminer_select_query($query) {
global $SELF;
// it would be nice if $query can be passed by reference and printed value would be returned but call_user() doesn't allow reference parameters
return call_adminer('select_query', "
" . htmlspecialchars($query) . "" . lang('Edit') . "\n", $query);
}
/** Description of a row in a table
* @param string
* @return string SQL expression, empty string for no description
*/
function adminer_row_description($table) {
return call_adminer('row_description', "", $table);
}
/** Get descriptions of selected data
* @param array all data to print
* @param array
* @return array
*/
function adminer_row_descriptions($rows, $foreign_keys) {
return call_adminer('row_descriptions', $rows, $rows, $foreign_keys);
}
/** Value printed in select table
* @param string escaped value to print
* @param string link to foreign key
* @return string
*/
function adminer_select_val($val, $link) {
return call_adminer('select_val', ($link ? "$val" : $val), $val, $link);
}
/** Query printed after execution in the message
* @param string executed query
* @return string
*/
function adminer_message_query($query) {
global $SELF;
$id = "sql-" . count($_SESSION["messages"]);
$_SESSION["history"][$_GET["server"]][$_GET["db"]][] = $query;
return call_adminer('message_query', " " . lang('SQL command') . "