Lord Northern
03-26-2008, 01:35 AM
Hey.
I've got a question.
I use pear db through php to access mysql and it usually, as it's supposed to be, returns an array.
Now, as an index of a specific place of the array I use numbers.
For example if I do:
$tamdeedeedam = $db -> getRow("SELECT name,age,location FROM users WHERE id ='5'");
Now, if I want to access age I'd do:
$tamdeedeedam[1];
Is there any way to use the field name instead of number so I'd only have to do:
$tamdeedeedam['age'];
I think I saw it somewhere. Is it possible?
I've got a question.
I use pear db through php to access mysql and it usually, as it's supposed to be, returns an array.
Now, as an index of a specific place of the array I use numbers.
For example if I do:
$tamdeedeedam = $db -> getRow("SELECT name,age,location FROM users WHERE id ='5'");
Now, if I want to access age I'd do:
$tamdeedeedam[1];
Is there any way to use the field name instead of number so I'd only have to do:
$tamdeedeedam['age'];
I think I saw it somewhere. Is it possible?
