| |||
Views: 88,501,749 |
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search | 04-29-24 04:57 PM |
|
Guest: Register | Login |
0 users currently in Computing | 2 guests |
Main - Computing - MySQL help (PHP) | New thread | New reply |
darkwitch |
| ||
Paragoomba Level: 20 Posts: 42/65 EXP: 41519 Next: 920 Since: 02-21-07 From: Puerto Rico Last post: 6224 days Last view: 6224 days |
So I need to figure out how to select all users that are online in a forum, but I also need to know if they are reading a thread which is in the forum (it counts as being in the forum). So I try using something like:
$sql ="SELECT * FROM threads,users WHERE threads.forum ='$forum[id]' AND users.lasturl = 'forum/$forum[id]' OR users.lasturl = ????" ???? is the part I can't figure how to do, I could use "LIKE 'thread/idhere%'" but then it would be inside quotes and be treated as text (the %). Any help would be apreciated |
Acmlm |
| ||
Flurry Level: 37 Posts: 161/251 EXP: 315117 Next: 23136 Since: 02-19-07 From: Mirabel, Québec, Canada Last post: 6183 days Last view: 1816 days |
Flurry #&postrank& When I did it before, I just made forum/thread pages set a "lastforum" field, then it was really simple:
SELECT * from USERS where lastforum=$forum[id] ____________________ |
darkwitch |
| ||
Paragoomba Level: 20 Posts: 43/65 EXP: 41519 Next: 920 Since: 02-21-07 From: Puerto Rico Last post: 6224 days Last view: 6224 days |
Hm, well, it's a nice solution. Thanks for the information |
Main - Computing - MySQL help (PHP) | New thread | New reply |
© 2005-2023 Acmlm, blackhole89, Xkeeper et al. |
MySQL - queries: 47, rows: 58/59, time: 0.015 seconds. |