For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > December 2004 > Resultset field object-type









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Resultset field object-type
Ike

2004-12-03, 3:57 pm

while ($row = mysql_fetch_row($qid)) {
for ($i = 0; $i < mysql_num_fields($qid); $i++) {
if (mysql_field_name($qid, $i)) {
$row[$i];

// HOW DO I KNOW WHAT KIND OF OBJECT $row[$i] IS HERE ????

}
}
}


Oli Filth

2004-12-03, 3:57 pm

Oli Filth wrote:[color=darkred]
> Ike wrote:
>

Actually, I don't think the array that mysql_fetch_row() returns can ever
contain a PHP object (i.e. class), it will always contain an integer, float, or
string. Which it is should be apparent from the MySQL type for the column in
question.

Oli
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com