Re: 'return value type' of mysql functions

From: Date: Fri, 28 Jun 2002 19:48:55 +0000
Subject: Re: 'return value type' of mysql functions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-104418@lists.php.net to get a copy of this message
On Saturday 29 June 2002 02:55, Erik Price wrote: > 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". MySQL enum types are always strings. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* He who laughs last didn't get the joke. */

« previous php.general (#104418) next »