Welcome Guest, Not a member yet? Register   Sign In
My query returns empty results with big tables. Any advice?
#5

Code:
if( $type == 'email' )
{
    $sql = "SELECT * FROM members WHERE email = ?";
    $query = $this->db->query( $sql, array( $input_string ) );

    // If email address is not unique
    if( $query->num_rows() > 1 )
    {
        echo 'More than one result:<br />';
        echo '<pre>';
        print_r( $query->result_array() );
        echo '</pre>';
    }

    // If email address is unique
    else if( $query->num_rows() == 1 )
    {
        echo 'Just one result:<br />';
        echo '<pre>';
        print_r( $query->row_array() );
        echo '</pre>';
    }

    echo 'No results';
}
Reply


Messages In This Thread
RE: My query returns empty results with big tables. Any advice? - by skunkbad - 09-14-2016, 04:37 PM



Theme © iAndrew 2016 - Forum software by © MyBB