Page 2 of 2

Posted: Sat Feb 14, 2004 10:27 pm
by markl999
id is from the address viewforum.php?fid=WHAT EVER NUMBER
Then as long as you are passing in fid=whatever in the url then there's no reason that query should fail as $_GET['fid'] will be set. Sounds like you arn't passing fid= in the url

Posted: Sat Feb 14, 2004 10:33 pm
by Dale
Oh woops spelling mistake :\ Anyway thats fixed now i just have this famous little error
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in c:\program files\app serv\www\forum\viewforum.php on line 25
Line 25:

Code: Select all

while($r=mysql_fetch_array($result))
Line 20 - 30:

Code: Select all

// Helped By markl999
$result = "SELECT * FROM df_threads WHERE forumid=".$_GET['fid'].""; 
 echo $result; //for debugging 
 mysql_query($result) or die(mysql_error());

while($r=mysql_fetch_array($result))
{
	$id=$r["id"];
	$title=$r["title"];
	$author=$r["author"];
	$posted=$r["posted"];

Posted: Sat Feb 14, 2004 10:35 pm
by markl999
// Helped By markl999
$result = "SELECT * FROM df_threads WHERE forumid=".$_GET['fid']."";
echo $result; //for debugging
mysql_query($result) or die(mysql_error());

while($r=mysql_fetch_array($result))
{
$id=$r["id"];
$title=$r["title"];
$author=$r["author"];
$posted=$r["posted"];
Change to

Code: Select all

// Helped By markl999 
$query = "SELECT * FROM df_threads WHERE forumid=".$_GET['fid'].""; 
echo $query; //for debugging 
$result = mysql_query($query) or die(mysql_error()); 

while($r=mysql_fetch_array($result)) 
{ 
   $id=$r["id"]; 
   $title=$r["title"]; 
   $author=$r["author"]; 
   $posted=$r["posted"];

Posted: Sat Feb 14, 2004 10:39 pm
by Dale
OH MY GOD!!!!!! Mark!!!!

Gimme your address i need to give you all the hugs and kisses i can!!!!!!! WOOHOO!!!!!!1

THANK YOU THANK YOU THANK YOU!!!!

Posted: Sat Feb 14, 2004 10:42 pm
by markl999
No problem. Watch out for the movie of this thread staring Brad Pitt as Dale and Sean Connery as MarkL ;)

Posted: Sat Feb 14, 2004 10:47 pm
by Dale
lol :D

Who gonna gonna be Dr. Evil im-a-nasty-piece-of-mysql-code-that-just-wants-to-bug-dale ???