![]() |
Can I combine these 2 queries into 1?
Thanks for helping in advance.
PHP Code:
|
Also, the other problem is that both tables have the same variable name 'userid' which gives me an 'ambiguous variable' mysql error.
|
try that one (not sure i'm not so good in mysql^^)
PHP Code:
|
Thanks... how would you display the result?
$top[user.userid] ? That gives a parse error $top[user.username]?? |
PHP Code:
(Just so you know, the original code had LIMIT 5 but I removed that since we are using query_first() anyway. If you want to get the top 5, you'll need some different code. But the code above does exactly the same thing your original code did.) |
Firefly, you are a king.
That worked like a charm. I was able to do a Top 5 using an array. Thanks. Your tip is going to help me in more ways than one. |
Glad I could help. :)
|
All times are GMT. The time now is 05:46 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|