Re: Can Someone Look At This Code?
| From: | Richard Lynch | Date: | Sun, 25 Aug 2002 00:24:46 +0000 |
| Subject: | Re: Can Someone Look At This Code? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-113998@lists.php.net to get a copy of this message | ||
>Ok here is the code:
>---------------------------------------------------------------------------
----------
>--
><?php
>$tbit =mysql_query("select * from threads")or
>die (mysql_error());
>while ($threadbit =mysql_fetch_array($tbit))
>{
> if ($threadbit ["sforumid"] == $sub)
What is in "$sub" Is it what you think it is?
It would be INFINITELY more efficient to use:
"select * from threads where sforumid = $sub"
in the first place...
> {
>?>
><a href="post.php?cat=<?php echo $threadbit ["sforumid"]; ?>">
><?php
> echo "New Thread";
> echo "</a>";
> }
>}
>mysql_free_result($tbit);
>?>
>
>-----------------------------------------------------------------------------------
> But for some reason it is shwoing the result the exact same time in
>accordance with the number of another variable?
What?
I do not understand this part at all.
--
Like Music? http://l-i-e.com/artists.htm