Hey guys, I posted this in the database forum but I'm worried the topic might be a little too newb to get answered. Moderators if I've committed a serious faux pas by this double post I apologize 😃
I'm trying to connect to my db, pull out values from two fields and cycle through and store the values in a multidimensional array.
Normally to get one field out I would run this:
e.g.
$blaharray[] = 0;
$blahcounter = 0;
$test = $db->query("SELECT field1 FROM testTable");
while ($row = $test->fetchRow(MDB2_FETCHMODE_ASSOC))
{
foreach($row as $key => $value)
{
$blaharray[$blahcounter] = $value;
$blahcounter++;
}
}
I'm not sure how to translate this into a multidimensional version. As always, any help would be greatly appreciated.