PEAR::DB and MySQL enum
| From: | Felberbaum, Yoav M. | Date: | Wed, 13 Mar 2002 14:08:21 +0000 |
| Subject: | PEAR::DB and MySQL enum | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-963@lists.php.net to get a copy of this message | ||
Hello,
At the moment, I have this in my code (pre-PEAR):-
-------------
<?php
while ($answer = mysql_fetch_array($result))
{
ereg( "('(.*)')", $answer[1], $temp );
$array = explode( "','", $temp[2] );
while (list ($key, $val) = each ($array))
{
echo "<option value=\"$val\">$val</option>\n";
}
}
echo "</SELECT>";
?>
-------------
Basically, what this does is to create an option list/pop-down list from an enum field in a MySQL
database.
But, the problem is I can not seem work out how this is done "via" the PEAR interface?
Is this even possible?
Many thanks!