Welcome Guest, Not a member yet? Register   Sign In
Proper way to return sql results
#2

[eluser]WanWizard[/eluser]
The query runs only once, that's not a problem.

It does uses some memory and processing as you fetch the resultset twice. You can do
Code:
if ( $query->num_rows() )
{
    return $query->result_array()
}
else
{
    return FALSE;
}


Messages In This Thread
Proper way to return sql results - by El Forum - 08-04-2010, 11:25 PM
Proper way to return sql results - by El Forum - 08-05-2010, 12:26 AM



Theme © iAndrew 2016 - Forum software by © MyBB