|
Posted by Anna on 02/02/07 15:47
Hi, I have the following MySQL table:
inner_id data1 data2 data3
->0 g sd ds
1 a n y
2 b o w
->3 c p aa
->3 d q bb
->3 e r cc
4 h u ff
5 i v gg
5 l z hh
6 m x i
After a query, I need to put all data in a bidimensional array this way:
every index of the array is an array, so that:
my_array[0] is array("data1"=>g,"data2"=>sd,"data3"=>ds)
BUT
my_array[3] is
array(array("data1"=>c,"data2"=>p,"data3"=>aa),array("data1"=>d,"data2"=>q,"data3"=>bb),array("data1"=>e,"data2"=>r,"data3"=>cc))
as for data1, data2, data3 labels, it is NOT important they match the
name of the field ("data1", "data2" can be ok too).
I simply can't do it: would you gently tell me how to do? Thanks!
Navigation:
[Reply to this message]
|