[solved] Next record, how to?

lo lopezio 26 May, 2011
Hi
I have thos piece of code inside my chronoform but I allways get the first record. How can I movenext?

<?php
$db =& JFactory::getDBO();
$query = "SELECT * from dt_brotero";
$db->setQuery($query);
$destino = $db->loadResult();
$num= $db->getAffectedRows();
$i=0;
$row = $db->loadRow();
while ( $i<$num ) {
echo ($row[3]);
echo"<br/>";
$i++;
}
?>  


Regards
Gr GreyHead 26 May, 2011
Hi lopezio,

Using $db->loadResult(); will only load one result.

Please see this page for the other methods you can use.

Bob
This topic is locked and no more replies can be posted.