Q: How to pull data from custom table to populate zustomizer setting/control select options

So i think I’ve found the answer to my own question. I modified the code in the original tablequerytest.php which queries the custom table and stores results from this: <?php global $wpdb; //Accessing WP Database (non-WP Table) use code below. $results = $wpdb->get_results(‘SELECT alias FROM wp_revslider_sliders’); foreach ($results as $result) { $revchoices = array(“text” => … Read more

Create table from array with prepare

I tried this in local, and I think you have multiple fields inside $fields so I’ve added them in array. Just look at the code below; it works fine as tested: add_action(‘your_hook’, ‘createTableFromFields’); function createTableFromFields($tablename) { $wpdb = $this->db; $tablename = $wpdb->prefix . $tablename; $fields = array(‘PersonID’,’LastName’); $sql=”CREATE TABLE IF NOT EXISTS %s (id INT(6) … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)