Arkvoodle` Posted October 19, 2008 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
radio_active Posted October 20, 2008 Posted October 20, 2008 Re: [mccode] Need help Well whats the problem, nothing showing, just refreshing the page? Quote
POG1 Posted October 20, 2008 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
Arkvoodle` Posted October 20, 2008 Author Posted October 20, 2008 Re: [mccode] Need help Replaces that top line? Quote
Arkvoodle` Posted October 20, 2008 Author Posted October 20, 2008 Re: [mccode] Need help Hasn't changed anything. =S Quote
POG1 Posted October 21, 2008 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
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.