The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
makechoosercode question
This is for vb 2.3.x in case it matters.
I have 2 tables, one with the id's and values for the dropdown entries. The other is the table the value is saved to. The table that populates the dropdown has fields 'id' and 'name' The choosercode is as follows: PHP Code:
states is the table it gets the values from So far so good, this part works. It does save the 'id' to the target table though, and not the name of the state/country. But I'm guessing that's still how it's supposed to be. Next part is where I'm confused. This is where I compile a list of members' addresses (the ones that put it in anyway). The search option it looks like this: PHP Code:
BUT, when the results come up, it shows the state id, and not the state name. I'm displaying $fas[state] . The question is: On the results, is there any way to have the name field show up instead of the id? I can't imagine I did anything wrong particularly since everything else works as expected. So am I doing something wrong, or is there any way I can have it show the results that actually mean something, rather than just a number? Thanks in advance |
#2
|
|||
|
|||
$states["$fas[state]"] maybe?
|
#3
|
|||
|
|||
That just gives errors. Without quotes or with single quotes it still doesn't like it
Guess one option would be to just replace the id's with actual state names and countries, right? As long as it's unique there shouldn't be a problem doing that... Nothing else uses that table and i'm the only one populating it, so... that would work right? |
#4
|
|||
|
|||
Sorry i have no knowledge of vB2 and without seeing more of your code (where is $fas defined) i cant help you more.
|
#5
|
|||
|
|||
Dank je Marco, but I figured it out. By changing the values in the tables I was able to get the results I was looking for, without too many php changes.
Doei |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|