Re: 'return value type' of mysql functions

From: Date: Fri, 28 Jun 2002 19:19:01 +0000
Subject: Re: 'return value type' of mysql functions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-104412@lists.php.net to get a copy of this message
Try gettype($row['columnname']) or var_dump($row) > I have checked through the manual, but I'm having a hard time nailing > something down. > > If I have a MySQL table and there is a column that is of type > ENUM('false','true'), then when I do this: > > // $result = MySQL resource from mysql_query() > while ($row = mysql_fetch_assoc($result)) { > // do something with $row['columnname'] > } > > what TYPE is the output? I assumed that it was of type string. But I'm > having problems with my code because of dynamic typing in PHP, so what I > wonder is whether it is really a type string or if it is being evaluated > as a boolean because it is a string whose value is "false" or "true".

« previous php.general (#104412) next »