Skip to content

Commit

Permalink
more db_query_bound
Browse files Browse the repository at this point in the history
git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@5223 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
mantis committed May 1, 2008
1 parent c266553 commit 88b5f71
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions core/bugnote_api.php
Expand Up @@ -341,7 +341,7 @@ function bugnote_get_all_bugnotes( $p_bug_id, $p_user_bugnote_order, $p_user_bug
} else {
## Use offset only if order is ASC to get the last bugnotes
if ( 'ASC' == $p_user_bugnote_order ) {
$result = db_query( "SELECT COUNT(*) AS row_count FROM $t_bugnote_table WHERE bug_id = '$c_bug_id'" );
$result = db_query_bound( "SELECT COUNT(*) AS row_count FROM $t_bugnote_table WHERE bug_id= " . db_param(0), array( $c_bug_id ) );
$row = db_fetch_array( $result );

$t_bugnote_offset = $row['row_count'] - $p_user_bugnote_limit;
Expand Down Expand Up @@ -400,11 +400,11 @@ function bugnote_set_time_tracking( $p_bugnote_id, $p_time_tracking ) {
$t_bugnote_table = db_get_table( 'mantis_bugnote_table' );

$query = "UPDATE $t_bugnote_table
SET time_tracking = '$c_bugnote_time_tracking'
WHERE id='$c_bugnote_id'";
db_query( $query );
SET time_tracking = " . db_param(0) . "
WHERE id=" . db_param(1);
db_query_bound( $query, Array( $c_bugnote_time_tracking, $c_bugnote_id ) );

# db_query() errors if there was a problem so:
# db_query errors if there was a problem so:
return true;
}

Expand Down

0 comments on commit 88b5f71

Please sign in to comment.