Welcome Guest, Not a member yet? Register   Sign In
how can I create an empty database query object?
#1

[eluser]fritzthecat[/eluser]
Hi. I need to pass the results of a subroutine to a function that expects a query object, and on occasions I need to create an empty db query object - something like

Code:
function getStuff( $id=false ) {
    if( !$id )    {
        return $this->db->query();
    }    else    {
        return $this->db->get_where( 'stuff', "id=$id" );
}

how would you do it?

thanks


Messages In This Thread
how can I create an empty database query object? - by El Forum - 04-08-2009, 10:42 AM
how can I create an empty database query object? - by El Forum - 04-08-2009, 10:47 AM
how can I create an empty database query object? - by El Forum - 04-08-2009, 10:54 AM
how can I create an empty database query object? - by El Forum - 04-08-2009, 02:25 PM
how can I create an empty database query object? - by El Forum - 04-08-2009, 10:27 PM
how can I create an empty database query object? - by El Forum - 04-09-2009, 04:29 AM
how can I create an empty database query object? - by El Forum - 04-09-2009, 05:02 AM
how can I create an empty database query object? - by El Forum - 04-09-2009, 05:08 AM
how can I create an empty database query object? - by El Forum - 04-09-2009, 06:01 AM
how can I create an empty database query object? - by El Forum - 04-09-2009, 07:06 AM
how can I create an empty database query object? - by El Forum - 04-09-2009, 01:03 PM
how can I create an empty database query object? - by El Forum - 08-20-2012, 07:53 AM
how can I create an empty database query object? - by El Forum - 08-20-2012, 07:57 AM



Theme © iAndrew 2016 - Forum software by © MyBB