Changeset 7645 for trunk/wp-admin/includes/comment.php
- Timestamp:
- 04/14/2008 04:13:25 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/includes/comment.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/comment.php
r7609 r7645 4 4 global $wpdb; 5 5 6 return $wpdb->get_var( "SELECT comment_post_ID FROM $wpdb->comments7 WHERE comment_author = '$comment_author' AND comment_date = '$comment_date'");6 return $wpdb->get_var( $wpdb->prepare("SELECT comment_post_ID FROM $wpdb->comments 7 WHERE comment_author = %s AND comment_date = %s", $comment_author, $comment_date) ); 8 8 } 9 9 … … 68 68 global $wpdb; 69 69 $post_id = (int) $post_id; 70 $pending = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->comments WHERE comment_post_ID = $post_id AND comment_approved = '0'");70 $pending = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved = '0'", $post_id) ); 71 71 return $pending; 72 72 }
Note: See TracChangeset
for help on using the changeset viewer.