![]() |
gspot, this is basically the same query as in my forumhome stats hack. If you don't use the table AS table on all tables in a query that access more than one table, you will never get it working for this guy right. This:
[SQL]LEFT JOIN user ON (users.referrerid = user.userid)[/SQL] HAS to be this: [SQL]LEFT JOIN user AS user ON (users.referrerid = user.userid)[/SQL] |
Thank you, should I add this to the main file in general?? :)
Not just for this guy, but for everyone?? |
Yes, because there will be others who use table prefixes and that is where you will need it. I found out the hard way about this. ;)
Just remember for future reference, that if it is only 1 table with no joins then you don't need the table AS table. Only if the query has more than one table in it is when you will need it. And all the tables in a query like that have to have the table AS table in it. It is the table prefixes that cause the problem with that. ;) |
Quote:
|
well i have a slight problem now
because the referals php seems to be using getinfo&username= but it would be better if it used userid because the way thats currently used won't parse ascii code for example a user name like this Code:
∙?МųşKąąη? |
Quote:
OK so my question is this..... My board is set up so that when you first register, your a registered user. When you make 5 posts, your automatically upgraded to a full member. Now, what I would like is to run a referral contest - but I only want those referrals that become full members to count in the score. (this way someone cant refer 20 false people or people who just sign up and never come back) Does this hack do that now? Aside from tht - what does this hack do that is different then the referral system built into VB3? |
Quote:
The query should actually be: PHP Code:
|
Quote:
yes i added a prefix of "vB3" so all the table in mysql database start with vB3.... if i have to change this everytime then this would explain why i get errors everytime i have to run a query right? |
Quote:
|
Database error in vBulletin 3.0.1:
Invalid SQL: SELECT username FROM precisi_forums.user WHERE referrerid = '1' AND referrerid > 0 mysql error: Table 'precisi_forums.user' doesn't exist mysql error number: 1146 sorry to keep bugging. changed code in referals.php and this is the new error i got. at least it is different |
All times are GMT. The time now is 11:26 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|