Hugs and kisses Dagon.
Two questions:
1) When I use print_r it gives me not only all the data but also the field names in the print out.
e.g. if I were to
print_r(new_array[0]);
I receive
Array ( [shareholderid] => 5 [certificate_creation_date] => 2009-09-28 )
Where as ideally I would like to receive 5, 2009-09-28. Or be able to type in
echo "Array[0][1]";
or something of the sort and just see
5
or 2009-09-28
To describe my problem in a little more detail, I would like to
1) cyle through all my dates, which are not unique to find the "highest" (which I hope is synonymous with most recent).
2)I need to store all the dates which are the same date as "highest", along with a unique identification number (which is a field in the same row as the date) in a separate array.
3)I need to update a value which is in the same row but a different field as the other two values.
Basically is there anyway to run the search I described above in a similar format as this:
$test = $db->query("SELECT field1,field2 FROM testTable");
while($row = $test->fetchRow(MDB2_FETCHMODE_ASSOC)
{
//place information in accessible format in this array
//perhaps I shouldn't be using fetchmode assoc?
}
//make a separate smaller multidimension array that has all the same dates but
//different identification numbers. Use that to modify a different field.
I know this is a lot but I tried to dejumble it as best as possible. While writing this I've realized I can set this up and do it as I was before with just the single field being returned but I'd like to optimize the process. On that note
My second question
2) What would you do to optimize the first code I posted Dagon?
Thanks so much for your time