Register | Login | |||||
Main
| Memberlist
| Active users
| ACS
| Commons
| Calendar
| Online users Ranks | FAQ | Color Chart | Photo album | IRC Chat |
| |
0 user currently in Acmlmboard support?. |
Acmlm's Board - I2 Archive - Acmlmboard support? - Need Help With Custom Page | | | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread |
User | Post | ||
TheGreatWhiteDope Koopa Banned Level: 16 Posts: 8/108 EXP: 19462 For next: 794 Since: 01-05-05 Since last post: 8 days Last activity: 4 days |
| ||
I am trying to make a page that shows the latest 50 threads but I keep getting errors, I can't see whats wrong with ti, it looks perefectly fine to me. I get an error that the mysql_fetch_array is wrong, the code is here. Please help me.. | |||
Cat Lover Level: 11 Posts: 20/50 EXP: 4928 For next: 1057 Since: 04-22-05 Since last post: 2 days Last activity: 2 days |
| ||
Uhh... Maybe because your telling it to die. | |||
Xeolord - B l u e s - Power Metal > All Level: 81 Posts: 1998/3418 EXP: 4884196 For next: 108653 Since: 03-15-04 From: Yeah Since last post: 15 hours Last activity: 15 hours |
| ||
Originally posted by Cat Lover And therefore nearly the entire acmlmboard system probably wouldn't work. In other words, you're wrong. All that simply means is that if that MySQL fetch doesn't work, it'll spit out an MySQL error in it's place. I take it you haven't really looked into the AB code then? Because it's in a lot of places. Besides that, I'm unsure what's wrong with this, like I told you over aim TGWD. |
|||
dan Snap Dragon Level: 43 Posts: 598/782 EXP: 534516 For next: 30530 Since: 03-15-04 Since last post: 20 hours Last activity: 14 hours |
| ||
Two things I've noticed: - The $query = "mysql_query.." line shouldn't have speech marks in there. - The "while ($threadr = mysql_fetch_array($threadf))" line. Where does $threadf get set in your code? Nowhere I can see. |
|||
Sandy53215 Acmlm (10:55:31 PM): they're having fun for the first time in so long Level: 47 Posts: 561/948 EXP: 713034 For next: 53169 Since: 03-15-04 From: Milwaukee, Wisconsin (U.S.A) Since last post: 1 day Last activity: 4 hours |
| ||
$content="$tccellh>$smallfont Last 50 Threads< should be... $content="$tccellh>$smallfont Last 50 Threads< Something else I noticed. (edited by Randy53215 on 05-30-05 09:34 AM) |
|||
CRZ Newcomer Level: 6 Posts: 5/9 EXP: 658 For next: 249 Since: 03-17-04 From: Twin Cities Since last post: 127 days Last activity: 6 days |
| ||
Originally posted by danHeed these quoted words. In addition... Not only are you pulling arrays out of a null (I think you must have meant $query instead of $threadf in your "while" line), you are repeatedly referencing $thread[something] when I can only assume you probably mean $threadr[something]. You'd probably also want to change that "$thread=blahblahblah" line to "$thread.=blahblahblah" (notice the dot) or you'll constantly overwrite your single row of output fifty times before your code finally gets around to printing it to screen. Balancing your <td> and </td> tags wouldn't hurt either In short...what a mess (edited by CRZ on 05-31-05 08:12 AM) |
|||
TheGreatWhiteDope Koopa Banned Level: 16 Posts: 9/108 EXP: 19462 For next: 794 Since: 01-05-05 Since last post: 8 days Last activity: 4 days |
| ||
Originally posted by dan Without speech marks I get an error. Originally posted by dan I allready fixed that, just didn't show it in the phpc. I fixed all of these problems but I still get the same error... When I removed the speech marks, I got a T_STRING error... |
|||
CRZ Newcomer Level: 6 Posts: 6/9 EXP: 658 For next: 249 Since: 03-17-04 From: Twin Cities Since last post: 127 days Last activity: 6 days |
| ||
You should probably update your page with the code on it... Try the quotes here... - $query="mysql_query(SELECT threads.id, threads.title, threads.lastpostdate, users.name as username, users.id as userid FROM threads,users WHERE users.id = threads.lastposter ORDER BY threads.lastpostdate DESC LIMIT 50) or die(mysql_error())"; + $threadf=mysql_query("SELECT threads.id, threads.title, threads.lastpostdate, users.name as username, users.id as userid FROM threads,users WHERE users.id = threads.lastposter ORDER BY threads.lastpostdate DESC LIMIT 50 or die(mysql_error())"); Sorry for all the edits - stupid parentheses... (edited by CRZ on 05-31-05 08:22 AM) (edited by CRZ on 05-31-05 08:23 AM) (edited by CRZ on 05-31-05 08:24 AM) (edited by CRZ on 05-31-05 08:25 AM) |
|||
TheGreatWhiteDope Koopa Banned Level: 16 Posts: 10/108 EXP: 19462 For next: 794 Since: 01-05-05 Since last post: 8 days Last activity: 4 days |
| ||
I did that and updated the code, still have that damn error though... | |||
CRZ Newcomer Level: 6 Posts: 7/9 EXP: 658 For next: 249 Since: 03-17-04 From: Twin Cities Since last post: 127 days Last activity: 6 days |
| ||
Originally posted by TheGreatWhiteDopeYou still have mismatched parens... - $query=mysql_query("SELECT thread.id, thread.title, thread.lastpostdate, user.name as username, user.id as userid FROM thread,users WHERE user.id = thread.lastposter ORDER BY thread.lastpostdate DESC LIMIT 50) or die(mysql_error()"); + $query=mysql_query("SELECT thread.id, thread.title, thread.lastpostdate, user.name as username, user.id as userid FROM thread,users WHERE user.id = thread.lastposter ORDER BY thread.lastpostdate DESC LIMIT 50 or die(mysql_error())"); |
|||
TheGreatWhiteDope Koopa Banned Level: 16 Posts: 11/108 EXP: 19462 For next: 794 Since: 01-05-05 Since last post: 8 days Last activity: 4 days |
| ||
Did that but still doesn't work... | |||
CRZ Newcomer Level: 6 Posts: 8/9 EXP: 658 For next: 249 Since: 03-17-04 From: Twin Cities Since last post: 127 days Last activity: 6 days |
| ||
Originally posted by TheGreatWhiteDopeOne of these times I'll give you good advice. You'll see. I moved the quotes again and also put some quotes around your die message. Try this out: - $query=mysql_query("SELECT thread.id, thread.title, thread.lastpostdate, user.name as username, user.id as userid FROM thread,users WHERE user.id = thread.lastposter ORDER BY thread.lastpostdate DESC LIMIT 50 or die(mysql_error())"); + $query=mysql_query("SELECT thread.id, thread.title, thread.lastpostdate, user.name as username, user.id as userid FROM thread,users WHERE user.id = thread.lastposter ORDER BY thread.lastpostdate DESC LIMIT 50") or die("mysql_error()"); FWIW, I did something like this on my own board a long time ago (the-w.com) but I never included the die message in my code... so maybe that's why I got confused earlier. I know this DOES work, though, since it's been on my board forever... |
|||
TheGreatWhiteDope Koopa Banned Level: 16 Posts: 12/108 EXP: 19462 For next: 794 Since: 01-05-05 Since last post: 8 days Last activity: 4 days |
| ||
Now I just get mysql_error() I fixed it though, when you have (mysql_error()), you can't put it in quotes or thats what it prints. Now I get Table 'romendob_newboard.thread' doesn't exist Edit- Nevermind, fixed it now, it had to be threads and users. Thanks for your help guys (edited by TheGreatWhiteDope on 05-31-05 09:43 AM) |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread |
Acmlm's Board - I2 Archive - Acmlmboard support? - Need Help With Custom Page | | | |