$getstocks = $DB_site->query_first("SELECT stockname,symbol FROM ".TABLE_PREFIX."stocks WHERE active=1 ORDER BY symbol");
while ($getstocks) { #MORE CODE HERE }