Welcome Guest, Not a member yet? Register   Sign In
$query->result() equivalent for a resource
#1

[eluser]Unknown[/eluser]
Hi, I'm new to CI and am using it in combination with AMFPHP, the flash-remoting gateway.

My problem is that AMFPHP expects a resource returned from a DB query (the kind you get from using mysql_query);

Code:
function getAllPoints()
    {
        mysql_connect(DB_HOST, DB_USER, DB_PASS);
        mysql_select_db(DB_NAME);
        return mysql_query(sprintf("SELECT * FROM points"));
    }

but I'd rather use CI's nicer DB methods;

Code:
function getAllPoints()
    {
               $query = $this->db->get($this->table);
        return $query->result();
    }


Is there any way to get $query->result() to return a resource like mysql_query does?

Thanks!


Messages In This Thread
$query->result() equivalent for a resource - by El Forum - 04-28-2008, 11:22 AM
$query->result() equivalent for a resource - by El Forum - 04-28-2008, 01:09 PM
$query->result() equivalent for a resource - by El Forum - 04-28-2008, 01:11 PM
$query->result() equivalent for a resource - by El Forum - 04-28-2008, 01:12 PM
$query->result() equivalent for a resource - by El Forum - 04-29-2008, 02:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB