<?php $sql = 'select ...'; if ( !($result = $db->sql_query($sql)) ) { } while ($row = $db->sql_fetchrow($result)) { } ?>
Jak to będzie wygladać?

<?php $sql = 'select ...'; if ( !($result = $db->sql_query($sql)) ) { } while ($row = $db->sql_fetchrow($result)) { } ?>