public function getMainDb($tables) {
$result = $this->db->row('SELECT * FROM '.$tables);
return $result;
}
public function getMainDb($tables) {
$result = $this->db->row("SELECT * FROM {$tables} ");
return $result;
}
public function getMainDb() {
global $tables
$result = $this->db->row("SELECT * FROM {$tables} ");
return $result;
}
get_the_post_thumbnail_url()
$post->ID
function get_b_cf7_func() {
global $wpdb;
$table_name = $wpdb->prefix . 'sell';
$user = wp_get_current_user()->user_login;
$query = $wpdb->get_results("SELECT * FROM ".$table_name." WHERE user_name='".$user."'");
$include_var = '';
foreach ($query as $q ):
$include_var .= "<tr><td>".$q->coin."</td><td>".$q->bank."</td><td>".$q->cours."</td></tr>";
$str = "<table class='table'<thead><tr><th> Title </th><th>Content</th><th>Date</th></tr></thead><tbody>".$include_var."</tbody></table>";
endforeach;
$str_ = $str;
return $str_;
}
add_shortcode('get_b', 'get_b_cf7_func');