Changeset 1743991
- Timestamp:
- 10/10/2017 02:48:46 PM (8 years ago)
- Location:
- fastdee/trunk/includes/core
- Files:
-
- 2 edited
-
class-fd-ofertas.php (modified) (1 diff)
-
class-fd-update.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
fastdee/trunk/includes/core/class-fd-ofertas.php
r1730613 r1743991 392 392 mt_offer_id.meta_value as _fd_offer_fastdee_id 393 393 FROM $wpdb->posts 394 LEFT JOIN $wpdb->postmeta AS mt_offer_id ON ( wp_posts.ID = mt_offer_id.post_id )394 LEFT JOIN $wpdb->postmeta AS mt_offer_id ON ( $wpdb->posts.ID = mt_offer_id.post_id ) 395 395 WHERE $wpdb->posts.post_type = 'product' 396 396 AND ( 397 wp_posts.post_status = 'publish'398 OR wp_posts.post_status = 'future'399 OR wp_posts.post_status = 'draft'400 OR wp_posts.post_status = 'pending'401 OR wp_posts.post_status = 'private'397 $wpdb->posts.post_status = 'publish' 398 OR $wpdb->posts.post_status = 'future' 399 OR $wpdb->posts.post_status = 'draft' 400 OR $wpdb->posts.post_status = 'pending' 401 OR $wpdb->posts.post_status = 'private' 402 402 ) 403 403 AND mt_offer_id.post_id IS NOT NULL -
fastdee/trunk/includes/core/class-fd-update.php
r1730613 r1743991 30 30 31 31 /** Busca total de ofertas do fastdee no bd 32 * 32 33 * @param bool $afterVersion2_4 34 * 33 35 * @return string|int 34 36 */ … … 103 105 $offersUpdated = $offset; //reset qtd atualizado 104 106 107 global $wpdb; 108 105 109 // busca só os que tem tem fd_id (antigos <v2.4 ficarao sem) 106 110 $queryString = " 107 111 SELECT 108 wp_posts.ID as post_id,112 $wpdb->posts.ID as post_id, 109 113 mt_offer_id.meta_value as _fd_offer_fastdee_id 110 FROM wp_posts111 LEFT JOIN wp_postmeta AS mt_offer_id ON ( wp_posts.ID = mt_offer_id.post_id )112 WHERE wp_posts.post_type = 'product'114 FROM $wpdb->posts 115 LEFT JOIN $wpdb->postmeta AS mt_offer_id ON ( $wpdb->posts.ID = mt_offer_id.post_id ) 116 WHERE $wpdb->posts.post_type = 'product' 113 117 AND ( 114 wp_posts.post_status = 'publish'115 OR wp_posts.post_status = 'future'116 OR wp_posts.post_status = 'draft'117 OR wp_posts.post_status = 'pending'118 OR wp_posts.post_status = 'private'118 $wpdb->posts.post_status = 'publish' 119 OR $wpdb->posts.post_status = 'future' 120 OR $wpdb->posts.post_status = 'draft' 121 OR $wpdb->posts.post_status = 'pending' 122 OR $wpdb->posts.post_status = 'private' 119 123 ) 120 124 AND mt_offer_id.post_id IS NOT NULL … … 123 127 OFFSET $offset"; 124 128 125 global $wpdb;126 129 $products = $wpdb->get_results( $queryString, OBJECT ); 127 130
Note: See TracChangeset
for help on using the changeset viewer.