Welcome Guest, Not a member yet? Register   Sign In
Extending DB record
#1

[eluser]crumpet[/eluser]
Is there a reason the db record class doesn't have a search function. Like if I already have retieved results for something and want to search through them to see if somethings there the fastest way I can see to do so is this
Code:
$found = FALSE;
$i = 0;
do{
    if ($searchID == $query->row($i)->ID)
    {
        $found = $query->row($i)->title;
    }
    $i++;
} while ($i < $query->num_rows());

is there a reason they didn't put this in? any advice on this code if i were to put it into my own db_result class as a $query->search($field, $search_value, $return_field) ?


Messages In This Thread
Extending DB record - by El Forum - 12-15-2008, 12:09 PM
Extending DB record - by El Forum - 12-15-2008, 01:15 PM



Theme © iAndrew 2016 - Forum software by © MyBB