Skip to content

Commit

Permalink
Fix #10446: PgSQL errors with manage_tags_page use of 'WHERE 1'.
Browse files Browse the repository at this point in the history
  • Loading branch information
amyreese committed May 1, 2009
1 parent 1a91f78 commit a4eec2f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions manage_tags_page.php
Expand Up @@ -82,7 +82,7 @@
$t_where_params = array();

if ( $f_filter === 'ALL' ) {
$t_where = '1';
$t_where = '';
} else {
$t_where_params[] = db_prepare_string( $f_filter . '%' );
$t_where = db_helper_like( 'name' );
Expand All @@ -97,7 +97,7 @@
$t_result = '';
$t_query = "SELECT count(*)
FROM $t_tag_table
WHERE $t_where";
$t_where";

$t_result = db_query_bound( $t_query, $t_where_params );
$t_row = db_fetch_array( $t_result );
Expand All @@ -123,8 +123,7 @@
# Retrive Tags from tag table
$t_query = "SELECT *
FROM $t_tag_table
WHERE " . $t_where .
' ORDER BY name';
$t_where ORDER BY name";

$t_result = db_query_bound( $t_query, $t_where_params, $t_per_page, $t_offset );

Expand Down

0 comments on commit a4eec2f

Please sign in to comment.