', '>=', '<', '<=', '!='); $textfunctions = array('LIKE', '=', '!='); /** * Not selection yet required -> displays the selection form */ if (!isset($param) || $param[0] == '') { // Gets some core libraries include('./tbl_properties_common.php3'); $err_url = 'tbl_select.php3' . $err_url; $url_query .= '&back=tbl_select.php3'; include('./tbl_properties_table_info.php3'); // Defines the url to return to in case of error in the next sql statement $err_url = $goto . '?lang=' . $lang . '&convcharset=' . $convcharset . '&server=' . $server . '&db=' . urlencode($db) . '&table=' . urlencode($table); // Gets the list and number of fields $local_query = 'SHOW FIELDS FROM ' . PMA_backquote($table) . ' FROM ' . PMA_backquote($db); $result = @PMA_mysql_query($local_query); if (!$result) { PMA_mysqlDie('', $local_query, '', $err_url); } else { $fields_cnt = mysql_num_rows($result); while ($row = PMA_mysql_fetch_array($result)) { $fields_list[] = $row['Field']; $type = $row['Type']; // reformat mysql query output - staybyte - 9. June 2001 $shorttype = substr($type, 0, 3); if ($shorttype == 'set' || $shorttype == 'enu') { $type = eregi_replace(',', ', ', $type); // Removes automatic MySQL escape format $type = str_replace('\'\'', '\\\'', $type); } $type = eregi_replace('BINARY', '', $type); $type = eregi_replace('ZEROFILL', '', $type); $type = eregi_replace('UNSIGNED', '', $type); if (empty($type)) { $type = ' '; } $fields_type[] = $type; } // end while mysql_free_result($result); ?>
       :
     
    
do the work */ else { // Builds the query $sql_query = 'SELECT ' . PMA_backquote(urldecode($param[0])); $i = 0; $c = count($param); while ($i < $c) { if ($i > 0) { $sql_query .= ',' . PMA_backquote(urldecode($param[$i])); } $i++; } $sql_query .= ' FROM ' . PMA_backquote($table); // The where clause if ($where != '') { $sql_query .= ' WHERE ' . ((get_magic_quotes_gpc()) ? stripslashes($where) : $where); } else { $sql_query .= ' WHERE 1'; for ($i = 0; $i < count($fields); $i++) { if (!empty($fields) && $fields[$i] != '') { if (eregi('char|blob|text|set|enum|date|time|year', $types[$i])) { $quot = '\''; } else { $quot = ''; } if (strtoupper($fields[$i]) == 'NULL' || strtoupper($fields[$i]) == 'NOT NULL') { $quot = ''; $func[$i] = 'IS'; } $sql_query .= ' AND ' . PMA_backquote(urldecode($names[$i])) . " $func[$i] $quot$fields[$i]$quot"; } // end if } // end for } // end if if ($orderField != '--nil--') { $sql_query .= ' ORDER BY ' . PMA_backquote(urldecode($orderField)) . ' ' . $order; } // end if // The query will be stripslashed in sql.php3 if "magic_quotes_gpc" is on if (get_magic_quotes_gpc()) { $sql_query = addslashes($sql_query); } include('./sql.php3'); } ?>