Arkvoodle` Posted October 19, 2008 Share Posted October 19, 2008 K just made a newspaper mod and it doesn't work. Forsome reason it doesn't give any errors either =/ As I believe, the error occours on these lines. Can anyone help me? SELECT is not my strong point =x $q=mysql_query("SELECT np.*,u1.username as poster FROM newspaper np LEFT JOIN users u1 ON u1.userid=np.pID LEFT JOIN newspaper u2 ON u2.userid=np.npSUBJECT ORDER BY np.npID DESC",$c) or die(mysql_error()); while($r=mysql_fetch_array($q)) { print "\n<tr> <td>[url='viewuser.php?u={$r[']{$r['poster']}[/url] [{$r['pID']}]</td> <td>[{$r['npSUBJECT']}]</td> <td>{$r['npTEXT']}</td> <td>[url='admin.php?action=repclear&ID={$r[']Clear[/url]</td> </tr>"; } SQL's are: npID pID npSUBJECT npTEXT npID = Newspaper ad id pID = player id npSUBJECT = subject ofcourse npTEXT = main ad.. Quote Link to comment Share on other sites More sharing options...
radio_active Posted October 20, 2008 Share Posted October 20, 2008 Re: [mccode] Need help Well whats the problem, nothing showing, just refreshing the page? Quote Link to comment Share on other sites More sharing options...
POG1 Posted October 20, 2008 Share Posted October 20, 2008 Re: [mccode] Need help $sql = "SELECT * FROM newspaper tORDER BY npID DESC"); $result = mysql_query($sql); if(!$result) { echo 'SELECTION ERROR'; $h->endpage(); die(); } while($r = mysql_fetch_array($result)) Quote Link to comment Share on other sites More sharing options...
Arkvoodle` Posted October 20, 2008 Author Share Posted October 20, 2008 Re: [mccode] Need help Replaces that top line? Quote Link to comment Share on other sites More sharing options...
POG1 Posted October 20, 2008 Share Posted October 20, 2008 Re: [mccode] Need help top2 Quote Link to comment Share on other sites More sharing options...
Arkvoodle` Posted October 20, 2008 Author Share Posted October 20, 2008 Re: [mccode] Need help Hasn't changed anything. =S Quote Link to comment Share on other sites More sharing options...
POG1 Posted October 21, 2008 Share Posted October 21, 2008 Re: [mccode] Need help $sql = "SELECT * FROM newspaper ORDER BY npID DESC"); $result = mysql_query($sql); if(!$result) { echo 'SELECTION ERROR'; $h->endpage(); die(); } while($r = mysql_fetch_array($result)) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.