WordPress.org

Plugin Directory

Changeset 1554462


Ignore:
Timestamp:
12/14/16 11:42:33 (8 months ago)
Author:
Elvin.Haci
Message:

2.0.4 uploaded. now you can add custom arguments to SQL query.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sql-chart-builder/trunk/initial_data.php

    r1553965 r1554462  
    1212        "select count(*) postcount,SUBSTRING(`post_date`,6,2) monthnum,SUBSTRING(`post_date`,1,4) yearnum,SUBSTRING(`post_date`,1,7) monthandyear from $wpdb->posts  group by monthnum,yearnum  order by monthnum ", 
    1313         
    14         "select count(*) postcount,SUBSTRING(`post_date`,6,2) monthnum,SUBSTRING(`post_date`,1,4) yearnum,SUBSTRING(`post_date`,1,7) monthandyear from $wpdb->posts where post_type='post'  group by monthnum,yearnum  order by monthnum ; 
    15   select count(*) postcount,SUBSTRING(`post_date`,6,2) monthnum,SUBSTRING(`post_date`,1,4) yearnum,SUBSTRING(`post_date`,1,7) monthandyear from $wpdb->posts where post_type!='post' group by monthnum,yearnum  order by monthnum", 
     14        "select count(*) postcount,SUBSTRING(`post_date`,6,2) monthnum,SUBSTRING(`post_date`,1,4) yearnum,SUBSTRING(`post_date`,1,7) monthandyear from $wpdb->posts where post_type=\"post\"  group by monthnum,yearnum  order by monthnum ; 
     15  select count(*) postcount,SUBSTRING(`post_date`,6,2) monthnum,SUBSTRING(`post_date`,1,4) yearnum,SUBSTRING(`post_date`,1,7) monthandyear from $wpdb->posts where post_type!=\"post\" group by monthnum,yearnum  order by monthnum", 
    1616         
    1717        "select count(*) postcount, SUBSTR(`post_date`,1,4) yearnum from $wpdb->posts  group by yearnum order by yearnum asc limit 10 ", 
     
    2020from $wpdb->posts a  
    2121inner join $wpdb->users b ON a.post_author=b.ID 
    22 where a.post_status='publish' 
     22where a.post_status=\"publish\" 
    2323group by a.post_author order by postcount desc limit 10" 
    2424    ); 
Note: See TracChangeset for help on using the changeset viewer.