' . htmlspecialchars($field["field"]) . '';
}
/** Links after select heading
* @param array result of SHOW TABLE STATUS
* @return string
*/
function selectLinks($tableStatus) {
global $SELF;
return '' . lang('Table structure') . '';
}
/** Find backward keys for table
* @param string
* @return array $return[$target_table][$key_name][$target_column] = $source_column;
*/
function backwardKeys($table) {
return array();
}
/** Query printed in select before execution
* @param string query to be executed
* @return string
*/
function selectQuery($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 "
" . htmlspecialchars($query) . "" . lang('Edit') . "\n";
}
/** Description of a row in a table
* @param string
* @return string SQL expression, empty string for no description
*/
function rowDescription($table) {
return "";
}
/** Get descriptions of selected data
* @param array all data to print
* @param array
* @return array
*/
function rowDescriptions($rows, $foreignKeys) {
return $rows;
}
/** Value printed in select table
* @param string escaped value to print
* @param string link to foreign key
* @param array single field returned from fields()
* @return string
*/
function selectVal($val, $link, $field) {
$return = ($field["type"] == "char" ? "$val" : $val);
if (ereg('blob|binary', $field["type"]) && !is_utf8($val)) {
$return = lang('%d byte(s)', strlen($val));
}
return ($link ? "$return" : $return);
}
/** Print extra text in the end of a select form
* @param array fields holding e-mails
* @return null
*/
function selectExtraDisplay($emailFields) {
}
/** Process extras in select form
* @param array AND conditions
* @return bool true if processed, false to process other parts of form
*/
function selectExtraProcess($where) {
return false;
}
/** Query printed after execution in the message
* @param string executed query
* @return string
*/
function messageQuery($query) {
global $SELF;
$id = "sql-" . count($_SESSION["messages"]);
$_SESSION["history"][$_GET["server"]][$_GET["db"]][] = $query;
return " " . lang('SQL command') . "