Advertisement
aitormendez

Query lolafonseca

Aug 2nd, 2016
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 2.74 KB | None | 0 0
  1. MariaDB [lolafonseca_staging]> SELECT wp_posts.* FROM wp_posts INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) WHERE 1=1 AND ( ( wp_postmeta.meta_key = '_featured' AND CAST(wp_postmeta.meta_value AS CHAR) = 'yes' ) ) AND wp_posts.post_type IN ('product', 'post') AND (wp_posts.post_status = 'publish') GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC;
  2. +----+-------------+---------------------+---------------------+--------------+------------+--------------+-------------+----------------+-------------+---------------+-----------+---------+--------+---------------------+---------------------+-----------------------+-------------+-----------------------------------------------------------+------------+-----------+----------------+---------------+
  3. | ID | post_author | post_date           | post_date_gmt       | post_content | post_title | post_excerpt | post_status | comment_status | ping_status | post_password | post_name | to_ping | pinged | post_modified       | post_modified_gmt   | post_content_filtered | post_parent | guid                                                      | menu_order | post_type | post_mime_type | comment_count |
  4. +----+-------------+---------------------+---------------------+--------------+------------+--------------+-------------+----------------+-------------+---------------+-----------+---------+--------+---------------------+---------------------+-----------------------+-------------+-----------------------------------------------------------+------------+-----------+----------------+---------------+
  5. | 15 |           1 | 2016-08-02 10:06:43 | 2016-08-02 10:06:43 |              | Prod 2     |              | publish     | open           | closed      |               | prod-2    |         |        | 2016-08-02 10:07:05 | 2016-08-02 10:07:05 |                       |           0 | http://stage.lolafonseca.com/?post_type=product&p=15 |          0 | product   |                |             0 |
  6. | 10 |           1 | 2016-07-02 10:04:25 | 2016-07-02 10:04:25 |              | Prod 1     |              | publish     | open           | closed      |               | prod-1    |         |        | 2016-08-02 10:08:38 | 2016-08-02 10:08:38 |                       |           0 | http://stage.lolafonseca.com/?post_type=product&p=10 |          0 | product   |                |             0 |
  7. +----+-------------+---------------------+---------------------+--------------+------------+--------------+-------------+----------------+-------------+---------------+-----------+---------+--------+---------------------+---------------------+-----------------------+-------------+-----------------------------------------------------------+------------+-----------+----------------+---------------+
  8. 2 rows in set (0.00 sec)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement