Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

wpdb get results foreach

$results=$wpdb->get_results("SELECT * FROM your_table_name WHERE id LIKE' . $id . ';");
foreach($results  as $key => $row) {
// each column in your row will be accessible like this
$my_column = $row->column_name;}
Source by wordpress.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #wpdb #results #foreach
ADD COMMENT
Topic
Name
7+1 =