1$results=$wpdb->get_results("SELECT * FROM your_table_name WHERE id LIKE' . $id . ';");
2foreach($results as $key => $row) {
3// each column in your row will be accessible like this
4$my_column = $row->column_name;}
1
2 $records=$wpdb->query("SELECT * FROM $wpdb->posts WHERE post_type = 'elements' AND post_status = 'publish'");
3
4 while($data=$records->fetch_assoc())
5 {
6 print_r($data);
7 }
8
9}