tektipsismyfavorite
Technical User
I have a main page that has a query to get all my clients in alphabetical order.
"SELECT * FROM clients ORDER BY cname ASC"
This obviously mixes up their IDs. So when I click on a client's name "Goofy" (id = 6), I need the next client "Mickey Mouse" (id = 2), and "Donald Duck" (id = 9) to be the previous client.
And I would prefer this to happen on the same page where it displays my client's details rather than have to put those vars in the URL.
To get my client, it's simply:
$client = $_GET['c'];
"SELECT * FROM clients WHERE clientid = '".$client."'"
"SELECT * FROM clients ORDER BY cname ASC"
This obviously mixes up their IDs. So when I click on a client's name "Goofy" (id = 6), I need the next client "Mickey Mouse" (id = 2), and "Donald Duck" (id = 9) to be the previous client.
And I would prefer this to happen on the same page where it displays my client's details rather than have to put those vars in the URL.
To get my client, it's simply:
$client = $_GET['c'];
"SELECT * FROM clients WHERE clientid = '".$client."'"