After setting my script houds on the hunt it appears there are 2 functions for collecting the state data. The one above that Mike mentioned and one in /includes/functions.php and the user registration actually uses that one instead of the other one. To be safe I would change both of them so the query is.... SELECT abbrev, name FROM class_states ORDER BY abbrev asc;
Hi thanks, you mean the code to read: $sSQL="SELECT abbrev, name FROM class_states ORDER BY abbrev ASC"; If so, it did not work. Thank you.
This is what Blair has sent me, but I have no idea how to properly code it so any help would be much appreciated. "Unfortunately, the system doesn't associate states with countries. So, you'll have to modify the states table by adding another column. Then, you'll have to modify the sql statement by returning the results by country ID first, then name."
In the examples given this is how it would work. In the abbrev column for each state, put the country (e.g. USA, CAN). Then the sort should be for ORDER BY abbrev ASC, name ASC. As the abbrev column is sorted first, that then puts in this example ALL the CAN states/provinces first alphabetically. It would then list all the USA states alphabetically. The code given for the sql search would need to be changed in both the Users.php AND the functions.php. PHP: $sSQL="SELECT name, abbrev FROM ".PREFIX."states ORDER BY abbrev ASC, name ASC"; The Users.php (/includes/classes/kernal) around line 318 in the function getStates(). The functions.php (/includes/) around line 102 in the function getStates. -Mike
Hi its me again, I upgraded to the new v4.1.3 Developer, and now Im back to square 1. Unfortunately I did not find this code under the two files you specified. Please advise where I should be looking for v4.1.3. Thank you.