Welcome Guest, Not a member yet? Register   Sign In
Numerically Indexed Result Arrays?!?
#1

[eluser]Unknown[/eluser]
I’m still fairly new to CI, but I’m really lovin’ it so far.

My problem is—PHP has a way to retrieve records from tables with a numeric index but, apparently, CI does not. (At least not in the documentation I’ve read so far.)

Does anyone know how to get a numerically indexed (0 to whatever) array from a query result such as:
$res = $this->db->getwhere(‘contacts’,array(‘id’=>$id));

When I use: $row = $res->row_array();
I get an array that does not allow me to place field contents using:

... value=”<?=$row[0]?>” ...

Am I just converting to the row incorrectly or what?
Signature

gulp What the ..... red face


Messages In This Thread
Numerically Indexed Result Arrays?!? - by El Forum - 11-28-2010, 01:43 AM
Numerically Indexed Result Arrays?!? - by El Forum - 11-28-2010, 01:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB