Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
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
Posted on 05-29-05 08:31 AM Link | Quote
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
Posted on 05-30-05 01:44 AM Link | Quote
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
Posted on 05-30-05 04:38 AM Link | Quote
Originally posted by Cat Lover
Uhh... Maybe because your telling it to die.


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
Posted on 05-30-05 03:32 PM Link | Quote
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
Posted on 05-31-05 02:33 AM Link | Quote
$content="$tccellh>$smallfont Last 50 Threads<tr>";

should be...

$content="$tccellh>$smallfont Last 50 Threads</td>";

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
Posted on 06-01-05 01:11 AM Link | Quote
Originally posted by dan
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.
Heed 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
Posted on 06-01-05 01:14 AM Link | Quote
Originally posted by dan
- The $query = "mysql_query.." line shouldn't have speech marks in there.



Without speech marks I get an error.

Originally posted by dan

- The "while ($threadr = mysql_fetch_array($threadf))" line. Where does $threadf get set in your code? Nowhere I can see.


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
Posted on 06-01-05 01:22 AM Link | Quote
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
Posted on 06-01-05 01:30 AM Link | Quote
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
Posted on 06-01-05 01:43 AM Link | Quote
Originally posted by TheGreatWhiteDope
I did that and updated the code, still have that damn error though...
You 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
Posted on 06-01-05 02:04 AM Link | Quote
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
Posted on 06-01-05 02:37 AM Link | Quote
Originally posted by TheGreatWhiteDope
Did that but still doesn't work...
One 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
Posted on 06-01-05 02:41 AM Link | Quote
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 | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.010 seconds.