Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Help with this code

Asked Modified Viewed 1,202 times
Z
Zidane55
Z
  • Member, joined since
  • Contributed 90 posts on the community forums.
  • Started 26 threads in the forums
  • Started this discussions
asked
Member

Hello. Can someone help me get this code working?

Posts:
".number_format(dbcount("(post_message)", DB_POSTS, "post_author='".$user_data['user_id']."' AND forum_id IN (1, 2, 3)"))."


It wont show the correct number, it only says 0. what do I need to add to the db call to get the code working?

$result = dbquery(
"SELECT
tf.forum_name,tf.forum_id,

tt.thread_id,tt.thread_locked,tt.thread_subject,tt.thread_author,tt.thread_views,
tt.thread_lastpost,tt.thread_lastuser, tt.thread_postcount, tt.thread_lastpostid as last_id,
if(tt.thread_lastpost>$lastvisited,1,0) as new_post,
tu.user_id, tu.user_name as user_name,
tau.user_name as author,

tp.post_message, tp.post_smileys

FROM ".DB_THREADS." tt
INNER JOIN ".DB_FORUMS." tf USING(forum_id)
INNER JOIN ".DB_POSTS." tp USING(thread_id)
INNER JOIN ".DB_USERS." tu ON tt.thread_lastuser=tu.user_id
INNER JOIN ".DB_USERS." tau ON tt.thread_author=tau.user_id
WHERE ".groupaccess('forum_access')." AND tf.forum_id IN (11)
AND tt.thread_lastpostid = tp.post_id
ORDER BY tt.thread_lastpost DESC LIMIT ".($min + $max)
);
0 replies
There are no post found.

Labels

None yet

Statistics

  • Views 0 views
  • Posts 0 posts
  • Votes 0 votes
  • Topic users 1 member

1 participant

Z
Z
  • Member, joined since
  • Contributed 90 posts on the community forums.
  • Started 26 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet