Welcome Guest, Not a member yet? Register   Sign In
Questions on working with db results
#4

[eluser]Mat-Moo[/eluser]
Code:
<ol>
&lt;?php
foreach($query->result() as $row)
{
  print "<li>".$row->fieldcolumn."</li>";
}
?&gt;
</ol>
$row will be an object of fields in your database, so if your database has "Id" and "Name" as two columns then use $row->Id and $row->Name.


Messages In This Thread
Questions on working with db results - by El Forum - 09-22-2010, 08:23 AM
Questions on working with db results - by El Forum - 09-22-2010, 08:27 AM
Questions on working with db results - by El Forum - 09-22-2010, 08:32 AM
Questions on working with db results - by El Forum - 09-22-2010, 08:34 AM
Questions on working with db results - by El Forum - 09-22-2010, 08:39 AM
Questions on working with db results - by El Forum - 09-22-2010, 12:47 PM
Questions on working with db results - by El Forum - 09-23-2010, 06:56 AM
Questions on working with db results - by El Forum - 09-23-2010, 07:13 AM
Questions on working with db results - by El Forum - 09-23-2010, 10:25 AM



Theme © iAndrew 2016 - Forum software by © MyBB