Changeset 7645 for trunk/wp-admin/includes/export.php
- Timestamp:
- 04/14/2008 04:13:25 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/includes/export.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/export.php
r7299 r7645 18 18 if ( $author and $author != 'all' ) { 19 19 $author_id = (int) $author; 20 $where = " WHERE post_author = '$author_id' ";20 $where = $wpdb->prepare(" WHERE post_author = %d ", $author_id); 21 21 } 22 22 … … 218 218 <?php } ?> 219 219 <?php 220 $postmeta = $wpdb->get_results( "SELECT * FROM $wpdb->postmeta WHERE post_id = $post->ID");220 $postmeta = $wpdb->get_results( $wpdb->prepare("SELECT * FROM $wpdb->postmeta WHERE post_id = %d", $post->ID) ); 221 221 if ( $postmeta ) { 222 222 ?> … … 229 229 <?php } ?> 230 230 <?php 231 $comments = $wpdb->get_results( "SELECT * FROM $wpdb->comments WHERE comment_post_ID = $post->ID");231 $comments = $wpdb->get_results( $wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d", $post->ID) ); 232 232 if ( $comments ) { foreach ( $comments as $c ) { ?> 233 233 <wp:comment>
Note: See TracChangeset
for help on using the changeset viewer.