| version 1.104, 2003/12/30 19:32:04 |
version 1.105, 2003/12/30 20:55:52 |
|
|
| * http://platon.sk/projects/phpMyEdit/ |
* http://platon.sk/projects/phpMyEdit/ |
| */ |
*/ |
| |
|
| /* $Platon: phpMyEdit/phpMyEdit.class.php,v 1.103 2003/12/19 17:06:23 nepto Exp $ */ |
/* $Platon: phpMyEdit/phpMyEdit.class.php,v 1.104 2003/12/30 19:32:04 nepto Exp $ */ |
| |
|
| /* This is a generic table editing program. The table and fields to be |
/* This is a generic table editing program. The table and fields to be |
| edited are defined in the calling program. |
edited are defined in the calling program. |
|
|
| } |
} |
| } |
} |
| $qparts['select']{strlen($qparts['select']) - 1} = ')'; |
$qparts['select']{strlen($qparts['select']) - 1} = ')'; |
| $qparts['select'] .= ' AS select_alias_'.$field_num; |
$qparts['select'] .= ' AS PMEalias'.$field_num; |
| $qparts['orderby'] = empty($desc['orderby']) |
$qparts['orderby'] = empty($desc['orderby']) |
| ? 'select_alias_'.$field_num : $desc['orderby']; |
? 'PMEalias'.$field_num : $desc['orderby']; |
| } else if ($desc && is_array($desc)) { |
} else if ($desc && is_array($desc)) { |
| // TODO |
// TODO |
| } else if ($desc) { |
} else if ($desc) { |
| Line 1691 function phpMyEdit_form_control(theForm) |
|
| Line 1691 function phpMyEdit_form_control(theForm) |
|
| $total_recs = 0; |
$total_recs = 0; |
| $count_parts = array( |
$count_parts = array( |
| 'type' => 'select', |
'type' => 'select', |
| 'select' => 'count(*) as num_rows', |
'select' => 'count(*)', |
| 'from' => $this->create_join_clause(), |
'from' => $this->create_join_clause(), |
| 'where' => $this->make_where_from_query_opts()); |
'where' => $this->make_where_from_query_opts()); |
| $res = $this->myquery($this->query_make($count_parts), __LINE__); |
$res = $this->myquery($this->query_make($count_parts), __LINE__); |
| $row = @mysql_fetch_array($res, MYSQL_ASSOC); |
$row = @mysql_fetch_array($res, MYSQL_NUM); |
| $total_recs = $row['num_rows']; |
$total_recs = $row[0]; |
| if ($this->nav_up()) { |
if ($this->nav_up()) { |
| $this->display_list_table_buttons($total_recs, 'up'); |
$this->display_list_table_buttons($total_recs, 'up'); |
| echo '<hr class="',$this->getCSSclass('hr', 'up'),'">',"\n"; |
echo '<hr class="',$this->getCSSclass('hr', 'up'),'">',"\n"; |