Bigjohn
02-20-2004, 01:11 PM
Please see this link. (http://jtest.stegenga.net/menubuild.php)
This is the code. Why is it not listing the unique subclasses?
$table_name='ornith';
$dbh=mysql_connect ("localhost", "xxxxx_joetest", "xxxxx") or die ('Cannot connect to Database - error: ' . mysql_error () );
mysql_select_db("xxxxx_joetest1",$dbh);
$sql = 'SELECT DISTINCT `subclass` '
. ' FROM ' . $table_name ;
$result= mysql_query($sql);
echo 'query =', $result;
while($row=mysql_fetch_array($result)){
$content =<<<END
<a href="http://jtest.stegenga.net/?table={$table_name}&subclass={$row}"></a>
END;
echo 'content=', $content;
} // while($row = mysql_fetch_array($result, MYSQL_ASSOC))
?>
I just don't get it! ARRRRGH.
John
This is the code. Why is it not listing the unique subclasses?
$table_name='ornith';
$dbh=mysql_connect ("localhost", "xxxxx_joetest", "xxxxx") or die ('Cannot connect to Database - error: ' . mysql_error () );
mysql_select_db("xxxxx_joetest1",$dbh);
$sql = 'SELECT DISTINCT `subclass` '
. ' FROM ' . $table_name ;
$result= mysql_query($sql);
echo 'query =', $result;
while($row=mysql_fetch_array($result)){
$content =<<<END
<a href="http://jtest.stegenga.net/?table={$table_name}&subclass={$row}"></a>
END;
echo 'content=', $content;
} // while($row = mysql_fetch_array($result, MYSQL_ASSOC))
?>
I just don't get it! ARRRRGH.
John