Welcome Guest, Not a member yet? Register   Sign In
Just the first record
#5

[eluser]Chris Williams[/eluser]
[quote author="inparo" date="1212369881"]I don't know if I understand the problem. How is it different from doing this:
Code:
$row1 = $query->row();
echo $row1->field1;

//all records
[/quote]

That's a good suggestion. A lot better than that I ended up with:

Code:
<?php foreach($query->result() as $row): ?>
<?php endforeach; ?>
<?=$row->field1?>

Which seems to work fine, if a bit hacky. :-)

Thanks!


Messages In This Thread
Just the first record - by El Forum - 06-01-2008, 11:19 AM
Just the first record - by El Forum - 06-01-2008, 12:34 PM
Just the first record - by El Forum - 06-01-2008, 12:40 PM
Just the first record - by El Forum - 06-01-2008, 02:24 PM
Just the first record - by El Forum - 06-01-2008, 03:46 PM



Theme © iAndrew 2016 - Forum software by © MyBB