WordPress.org

Plugin Directory

Changeset 1554461


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

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

Location:
sql-chart-builder/trunk
Files:
3 edited

Legend:

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

    r1553965 r1554461  
    242242    $tip_g = get_post_meta($atts['id'], 'guaven_sqlcharts_graphtype', true); 
    243243     
     244    for($i=1;$i<20;$i++){ $replacearg=!empty($atts["arg".$i])?$atts["arg".$i]:0;  
     245        $sql=str_replace("{arg".$i."}",esc_sql($replacearg),$sql);} 
    244246    $sql_split         = explode(';', $sql); 
    245247    $labels_and_values = array(); 
     
    249251    for ($i = 0; $i < count($sql_split); $i++) { 
    250252        if (!empty($sql_split[$i])) { 
     253 
    251254            $fvs = $wpdb->get_results($sql_split[$i]); 
    252255            $wpdb->show_errors(); 
     
    490493        return 'You given SQL code contains forbidden commands. Remember that you should only use SELECT queries'; 
    491494     
     495    for($i=1;$i<20;$i++){ $replacearg=!empty($atts["arg".$i])?$atts["arg".$i]:0;  
     496        $sql=str_replace("{arg".$i."}",esc_sql($replacearg),$sql);} 
     497     
    492498    $fvs = $wpdb->get_results($sql); 
    493499     
  • sql-chart-builder/trunk/guaven_sqlcharts.php

    r1553966 r1554461  
    44 * Plugin URI:        http://guaven.com/updatepusher 
    55 * Description:       Turn your SQL queries to Google Charts 
    6  * Version:           2.0.3 
     6 * Version:           2.0.4 
    77 * Author:            Guaven Labs 
    88 * Author URI:        http://guaven.com/ 
  • sql-chart-builder/trunk/readme.txt

    r1553966 r1554461  
    44Requires at least: 3.9.0 
    55Tested up to: 4.7.0 
    6 Stable tag: 2.0.3 
     6Stable tag: 2.0.4 
    77Donate link: http://guaven.com/donate 
    88License: GPLv2 or later 
     
    2020enter field names, labels and then press to Publish/Update 
    2121 
    22 3. After update/save you will see needed shortcode below there. You can use that shortcode anywhere in your website: in pages, posts, widgets etc. 
     223. You can use multiple SQL queries too. Just split them by ; sign. You can add shortcode argument to SQL query. For example if you  
     23type "select * from wp_posts where ID>{arg1}" then it you can pass arg1 value to the query with  [gvn_schart_2 id="2" arg1="11"] shortcode.  
     24 
     254. After update/save you will see needed shortcode below there. You can use that shortcode anywhere in your website: in pages, posts, widgets etc. 
    2326 
    2427 
     
    6164== Changelog == 
    6265 
     66= 2.0.4= 
     67 
     68Now you can add custom arguments to the SQL query. 
     69 
    6370= 2.0.0= 
     71 
    6472* New non-Google Local Charts added. 
     73 
    6574* Use multiple mysql queries in one graph. 
     75 
    6676= 1.0.0= 
     77 
    6778* Uploaded to Wordpress.org 
     79 
    6880= 1.0.2= 
     81 
    6982* Little fixes 
     83 
    7084= 1.0.5= 
     85 
    7186* Added WP 4.7 compatibility 
     87 
    7288* Fixed "multiple charts in one page" issue. 
Note: See TracChangeset for help on using the changeset viewer.