by Darko Miletić.
Note the name of the method you are using - get_record_sql . This method retourns ONE record only. If you want to get all records in a table use get_records_sql.