hi guys i am trying to populate a select element with options from the data in one of my sql tables heres what i have so far:
<?
$SQL = "SELECT * FROM pt_country ORDER BY name";
$rs = $wpdb->query($SQL);
$nr = mysql_num_rows($rs);
for ($i=0; $i<$nr; $i++) {
$r = mysql_fetch_array($rs);
echo "<OPTION VALUE=\"".$r["countrycode"]."\">".$r["country"]."</OPTION>";
}
?>
im guessing quite a bit of this is wrong but to start with i cant get wordpress to return the data i just get false what am i missing here ?