I need some coding help....I'm trying to connect to MYSQL and retrieve some data...the data is multidim...Ihave a code to retrieve a certain information by having the module search the database where an ID = $ID that i'm passing through...however, it retrieves all of the listed information, except for the last one. For example, if the information has 4 listed information, it only gets the first 3. Here is the code i have now.
<?php
connect to database....
$result = mysql_query("SELECT text FROM reqs WHERE listID=\"$ID%\"");
if ($row = mysql_fetch_array($result)) {
print ("<tr><td><b>Requirements to Enroll </b></td>");
print ("<td><ol>");
while($row = mysql_fetch_object($result)){
print ("<li>");
echo $row->text;
}
print ("</ol></td></tr>");
?>