Page 1 of 1

HELP.... errors... gah!

Posted: Mon Jun 09, 2003 3:42 am
by Gappa
I had a nice piece of code it was all working... now its not, I dont recall changing anything....

this is the error:
SELECT topic_title, topic_id, FROM_UNIXTIME(topic_time,"%W the %D %M @ %r") AS Topic_Date, post_text, username FROM phpbb_topics RIGHT JOIN phpbb_posts_text ON topic_first_post_id=post_id RIGHT JOIN phpbb_users ON topic_poster=user_id WHERE forum_id=6 ORDER BY topic_time DESC: Cross dependency found in OUTER JOIN. Examine your ON conditions

and here is my code:

Code: Select all

<html>

<head>
<title>Rantage.tk :: News</title>
</head>

<body bgcolor="#000000" text="#FFFFFF" link="#6699FF" vlink="#6699FF" alink="#6699FF" topmargin="0" leftmargin="0">

  <center>
    <table border="0" width="786" height="100" background="rantage.jpg" cellspacing="0" cellpadding="0">
  <td width="265" valign="bottom">
    <p align="right"><img border="0" src="button1.gif" width="30" height="30"><a href="http://www.hostultra.com/~Gappa/phpBB2/index.php"><img border="0" src="button2.gif" width="30" height="30"></a><a href="http://www.hostultra.com/~Gappa/gallery.php"><img border="0" src="button2.gif" width="30" height="30"></a><a href="http://www.hostultra.com/~Gappa/links.php"><img border="0" src="button2.gif" width="30" height="30"></a>
  <td width="521"><FONT FACE=Arial SIZE=-2><script language="JavaScript" type="text/javascript" src="http://www.hostultra.com/~Gappa/phpBB2/topics_anywhere.php?mode=show&f=bKDQsIDEsIDIsIDUp&n=3&r=y&b=lpi&lpb=1&cl=style.css&ct=style.css"></script>  </td></table>

  <table border="0" width="764">
  <?php
$db = mysql_connect("localhost", "Gappa", "*****"); 
mysql_select_db("Gappa",$db); 
 

$query = 'SELECT topic_title, topic_id, FROM_UNIXTIME(topic_time,"%W the %D %M @ %r") AS Topic_Date, post_text, username FROM phpbb_topics RIGHT JOIN phpbb_posts_text ON topic_first_post_id=post_id RIGHT JOIN phpbb_users ON topic_poster=user_id WHERE forum_id=6 ORDER BY topic_time DESC'; 
$result = mysql_query($query, $db) or die ($query .': '.mysql_error()); 


while($row = mysql_fetch_assoc($result)) 
   { 
echo "<br/><b><FONT FACE=Arial SIZE=-1 COLOR=#6699FF>"; 
echo "$row[topic_title]:</FONT></b><br/>"; 
echo "<FONT FACE=Arail SIZE=-2 COLOR=#999999>posted by: <b>$row[username]</b>"; 
echo " on: "; 
echo "$row[Topic_Date]</FONT><br/><hr><br/>"; 
echo "<FONT FACE=Arail SIZE=-1 COLOR=#FFFFFF> $row[post_text]</FONT>"; 
echo "<br/><br/>";  
echo "<FONT FACE=Arial SIZE=-2>"; 
echo "<a href="http://www.hostultra.com/~Gappa/phpBB2/viewtopic.php?t=$row[topic_id]"><b><FONT COLOR=#6699FF>Read comments</FONT></b></a></FONT>";
echo "<br/><br/>";  
} 



?> 

  </table>
<table border="0" width="786" height="100" background="footer.jpg" cellspacing="0" cellpadding="0">
  <td width="768">
  <p align="center"><font face="Arial" size="1">hosted by <a href="http://www.hostultra.com/cgi-bin/ref.cgi?Gappa
">Hostultra</a><br>
          message board powered by phpBB 2.0.4</font></td>
  </table>

  </center>

</body>
</html>

Can somebody see a problem???

Posted: Mon Jun 09, 2003 6:34 pm
by Gappa
No one see any errors???? :(

Posted: Mon Jun 09, 2003 6:48 pm
by Galahad
What do you mean when you say it doesn't work? Does it give you errors? Does it do anything?

Posted: Mon Jun 09, 2003 7:11 pm
by Gappa
This is what it is displaying:

this is the error:
SELECT topic_title, topic_id, FROM_UNIXTIME(topic_time,"%W the %D %M @ %r") AS Topic_Date, post_text, username FROM phpbb_topics RIGHT JOIN phpbb_posts_text ON topic_first_post_id=post_id RIGHT JOIN phpbb_users ON topic_poster=user_id WHERE forum_id=6 ORDER BY topic_time DESC: Cross dependency found in OUTER JOIN. Examine your ON conditions


"Cross dependency found in OUTER JOIN. Examine your ON conditions"

???? I got no ideas what the hell is going on :?

Posted: Mon Jun 09, 2003 9:53 pm
by stc7outlaw
is that supposed to be a loop. Its missing something i think
їcode]$row++ ї/code]
at the end because if it is a loop, it needs to loop.

Posted: Mon Jun 09, 2003 11:18 pm
by Gappa
I dont believe a Loop statement is required, think this is more a MySQL problem rather than PHP come to think of it... still any ideas???

I did have this working buyt now its failing, I dont recall any changes being made.