', '>=', '<', '<=', '!='); $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 .= '&goto=tbl_select.php3&back=tbl_select.php3'; include('./tbl_properties_table_info.php3'); if (!isset($goto)) { $goto = $cfg['DefaultTabTable']; } // Defines the url to return to in case of error in the next sql statement $err_url = $goto . '?' . PMA_generate_common_url($db, $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); } else { $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); // // retrieve keys into foreign fields, if any $cfgRelation = PMA_getRelationsParam(); // check also foreigners even if relwork is FALSE (to get // foreign keys from innodb) //$foreigners = ($cfgRelation['relwork'] ? PMA_getForeigners($db, $table) : FALSE); $foreigners = PMA_getForeigners($db, $table); ?>
       :
     
    
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 ' . $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 include('./sql.php3'); } ?>