SQL Query doesn't work
Hi my page won’t load apparently something wrong with my query but i tried many ways. stuck 🙁
//$sQuery = ‘SELECT DISTINCT meta_value FROM $wpdb->postmeta WHERE meta_key=property_for_sale_details_0_bathrooms’;
$sQuery = ‘SELECT meta_value FROM ‘.$wpdb->postmeta.’ WHERE meta_key=”property_for_sale_details_0_bathrooms” GROUP BY meta_value’;
$myrows = $wpdb->get_results($sQuery());
echo $myrows; //echo $myrows;
- The topic ‘SQL Query doesn't work’ is closed to new replies.