-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Okay, so I am not much of an expert when it comes to jQuery. So I though maybe someone could help me out a bit.
WHAT I AM TRYING TO DO:
I need to get these entries to the template, so that I could populate the graph.
- Entries in DB https://www.dropbox.com/s/wrdb2r3nxyxsagf/Screenshot%202014-08-17%2005.30.10.png
- Graph https://www.dropbox.com/s/2mcq5bhr3sji4ml/Screenshot%202014-08-17%2005.33.47.png
Currently the graph is populate by variables which are acquired through QuantiModo API. I figured it out where it is initializing them but I couldn't find out how to use this var to use my database entries.
Initialized Here: https://github.com/Abolitionist-Project/QM-Personal-Studies-Plugin/blob/master/themefiles/js/libs/quantimodo-api.js#L137
I also tried to import the entries to a PHP function and then adding them to the 'variableName', but it didn't work. Here is what I tried ..
<?php
global $wpdb;
$postid = $wpdb->get_results('SELECT post_id FROM qm_postmeta');
$metaid = $wpdb->get_results('SELECT meta_id FROM qm_postmeta');
$metakey = $wpdb->get_results('SELECT meta_key FROM qm_postmeta');
$metavalue = $wpdb->get_results('SELECT meta_value FROM qm_postmeta');
$currentpostid = get_the_ID();
if(!empty($metavalue)) {
while($postid == $currentpostid){
$metavalue = $variable['variableName'];
return $variable;
}
}
?>