vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Can anyone help/mentor me with this simple hack please? (https://vborg.vbsupport.ru/showthread.php?t=129650)

Razasharp 10-22-2006 01:08 AM

Can anyone help/mentor me with this simple hack please?
 
I am trying to get users latest X posted threads from specific forums showing in the user profiles. I have limited PHP Mysql knowledge (but am learning) so was wondering if someone could help me with this please? I'd very much appreciate it :)

I basically want to display 3 seperate blocks (1 for each forum) showing the latest 5 threads that a user has posted in their profile page:

Quote:

See User's latest 5 threads posted in forum10

-Users latest thread 1 Title
date posted

-Users latest thread 2 Title
date posted

-Users latest thread 3 Title
date posted

-Users latest thread 4 Title
date posted

-Users latest thread 5 Title
date posted


See User's latest 5 threads posted in forum15

-Users latest thread 1 Title
date posted

-Users latest thread 2 Title
date posted

-Users latest thread 3 Title
date posted

-Users latest thread 4 Title
date posted

-Users latest thread 5 Title
date posted


See User's latest 5 threads posted in forum16

-Users latest thread 1 Title
date posted

-Users latest thread 2 Title
date posted

-Users latest thread 3 Title
date posted

-Users latest thread 4 Title
date posted

-Users latest thread 5 Title
date posted

I could probably do it with 3 querys but am sure it's possible with just one?

Any help is appreciated.

Thanks.

Paul M 10-22-2006 01:33 AM

You could obviously do it with three queries - you cannot do it directly with one (not that I can think of anyway). You could however run one query - and then use some php to extract the required data from the result.

Razasharp 10-22-2006 03:42 PM

Quote:

Originally Posted by Paul M
You could however run one query - and then use some php to extract the required data from the result.

That's what I was thinking, but not sure how to go about it.. can you help me with this please Paul? :classic:

Paul M 10-22-2006 03:58 PM

Well I'm very busy, but I'll see what I can do, what do you want to know ?


All times are GMT. The time now is 07:58 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01082 seconds
  • Memory Usage 1,725KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete