The Arcive of vBulletin Modifications Site. |
|
Combo Box in User CP (part of bigger hack) Details »»
|
|||||||||||||||||||||||||
Please help me I have tried to convert the sytle drop down hack to suit my needs for a multirank hack I am creating... This is the last stage in the hack, but I am getting an MySQL error from the modified usercp.php file.
The error is this PHP Code:
PHP Code:
Thank you Phenix Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
the table rank does not have a field "rank"
you should add this field befor run those queries. |
|
#3
|
|||
|
|||
|
well I added a field to userfield called rank. Could u explian why that the code is looking for rank>ranks (when I thought it was looking for userfield>rank & rankcatgories>cat_name)
|
|
#4
|
||||
|
||||
|
JOIN rankcategories USING (rank)
that part produces your error. it means that userfield AND rankcategories must have a field rank, so they can be combined on this table-field |
|
#5
|
|||
|
|||
|
So you suggest the php to be;
PHP Code:
|
|
#6
|
||||
|
||||
|
no that wouldn't work, too.
i can't tell you exactly, because i'm not a mysql guru, i just saw the mistake you made, but not how it would be correct id suggest you should rename the field rank from userfield into cat_name and then use this query: Code:
SELECT rankcategories.cat_name, COUNT(*) AS count FROM userfield LEFT JOIN rankcategories USING (cat_name) GROUP BY userfield.cat_name |
|
#7
|
|||
|
|||
|
ok thx... I'll try that
|
![]() |
|
|