PDA

View Full Version : Order of Agents in view_users.php



perry
06-05-2004, 03:29 PM
The GetAllUsersData() is the only function called in this, and it lists all the agents in alphabetical order. I am unable to find where this function is in both common.php and main.php what i want to do is make is one agent is allways on the top of the list and the rest can be in ABC order, or perhaps a way to assign the order myself

any ideers?

Andre
06-05-2004, 05:20 PM
function is probably in the style.php page.

sharon
06-05-2004, 09:44 PM
Are you trying to create a hierarchy (broker, with agents below him/her)? If so, you may want to just add another item to each record that shows the broker assigned to that agent. Just a thought.

perry
06-06-2004, 02:03 AM
i just want my favorite one 1st instead of the guy who's name starts with an a

the function is in the style.php file

but i cant figure out how to edit it to make it show them in reverse order
since i only have 2 that should be a simple fix

sharon
06-06-2004, 02:30 AM
Put an underline before his name. That should pop him to the top and still look okay in any listing. Most people don't even notice an underline.

Take Care, Sharon

RealtyOne
06-06-2004, 02:45 AM
you could also change it to order by ID and since you have only 2 your number one needs only be the first number. (after admin since admin are not used)

sa278
06-06-2004, 06:35 AM
For me I changed the style.php to sort by date. Thus I go into the MySql and change the date of creation to the earliest manually to ensure that I stay on Top all the time. The rest of the agents, I used the creation date to position them.

perry
06-06-2004, 11:56 AM
How did you make it sort by date?

Fat Lizard
06-06-2004, 12:09 PM
How did you make it sort by date?

$sql = "blah blah etc etc .... ORDER BY DATE";

perry
06-06-2004, 03:02 PM
unction getAllUsersData()

{

// grabs the main info for a given user

global $conn, $lang, $config;



$user = make_db_extra_safe($user);

$sql = "SELECT user_name, emailAddress, ID FROM " . $config[table_prefix] . "UserDB where isAdmin = 'No' and isAgent = 'Yes' order by user_name";




So just change the word user_name to 'date' ?

thanks

perry
06-06-2004, 03:06 PM
that did not work

Fat Lizard
06-07-2004, 12:06 AM
unction getAllUsersData()

{

// grabs the main info for a given user

global $conn, $lang, $config;



$user = make_db_extra_safe($user);

$sql = "SELECT user_name, emailAddress, ID FROM " . $config[table_prefix] . "UserDB where isAdmin = 'No' and isAgent = 'Yes' order by user_name";




So just change the word user_name to 'date' ?

thanks

Nope, change user_name to creation_date

The 'order by' filed has to exist in the table.
The only fields containing dates in userdb are creation_date and last_modified

kalidust
06-22-2004, 03:20 PM
I edited the style.php file for the order to be by creation_date but it didn't work for me. Is there something else I could try?


Edited -- I was editing the wrong style.php file. Now I got it :)