behaviour of mysql_fetch_array
Posted: Tue Mar 16, 2010 3:47 pm
Hi there,
I am a reasonably experienced php developer but havent run into this before.
I am trying to abstract usage of mysql functions for a project we are working on (yes i am aware of mdb2), but there is one big roadblock i am running into.
In mysql, if you are not querying on a primary key you must do something like: while($resource = mysql_fectch_array){}
in my abtracted object, i want to emulate this kind of functionality (as opposed to just returning an array of all of the values from the query, which would be simple enough to do).
Does anyone know how i could go about doing this?
thanks for any help!
I am a reasonably experienced php developer but havent run into this before.
I am trying to abstract usage of mysql functions for a project we are working on (yes i am aware of mdb2), but there is one big roadblock i am running into.
In mysql, if you are not querying on a primary key you must do something like: while($resource = mysql_fectch_array){}
in my abtracted object, i want to emulate this kind of functionality (as opposed to just returning an array of all of the values from the query, which would be simple enough to do).
Does anyone know how i could go about doing this?
thanks for any help!