I have a table (alphajob_sats) with 2 fields(columns) and 5 records(rows), and I want $myrows = this data, but how?
In Joomla an access to database could be:
function getSats() {
$db = JFactory::getDBO();
$sql = “SELECT * FROM jos_alphajob_sats”;
$db->setQuery($sql);
$data = $db->loadObjectList();
return($data);
}
How is the code in WordPress?
This code are not giving the right result:
global $wpdb;
$myrows = $wpdb->get_results( “SELECT * FROM alphajob_sats” );
Please help!