Helpful Information
 
 
Category: PHP Development
MySql problem!! please help

Hi,

This won't work!!

location:
http://test:test@thejedi.com/links

it only prints out the subcategories for one topic! No errors
Here's the code (I have tried everything I can think of)

<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
<?
require('/home/thejedi/inc/connect.inc');

$result = MYSQL_QUERY("SELECT * FROM linktop order by id");
$number = MYSQL_NUMROWS($result);

$resultsub = MYSQL_QUERY("SELECT * FROM links order by id") or die("Bad query: ".mysql_error());;
$numbersub = MYSQL_NUMROWS($resultsub);
$i = 0;
?>
<font face="Arial,Helvetica,Verdana" size="2">
Welcome to the all new link list at thejedi.com<BR><BR>
You can view the different categories by clicking below<BR>
<img src="http://www.thejedi.com/bar.gif" width=450 height=1><BR>
<?
echo $tem;
WHILE ($i < $number){
$row = mysql_fetch_array($result);
echo "<FONT SIZE="3">$row[name]</FONT><BR>nn";
echo '<TABLE>';
$id = 0;
while ($id < $numbersub){
$rowsub = mysql_fetch_array($resultsub);
if($rowsub[top] == $row[id]){
echo '<TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="'.$dir."links.htm?id=$rowsub[id]">$rowsub[name]</A></TD><TD>- $rowsub[totalmes] Link";
echo ($rowsub[totalmes] == 1)?'':'s'."</TD></TR>nn";
}
$id++;
}
echo '</TABLE>';
echo '<BR>';
$i++;
}

echo "</FONT>n";
MYSQL_CLOSE();
?>
</FONT>
[/quote]

I know nothing about mySQL, but you've probaly found out in the past million years. HAHAHAHAHA, not, but I do think that you did find out.










privacy (GDPR)