Hi,
i am looking for 2 MySQL commands, which i hope exist:
Lets say i have a user-table and now i want to make a "SELECT * FROM user-table", BUT i want to order it! I want to have "user5", instead of "user1" (ORDER BY user-name) or "user_last" (ORDER BY user-name DESC), on top of the result-list.
Is there a command which enables me to do so?
The next problem:
Lets say i have a table, where each of the above users has several entries, e.g.:
name | no | ...
------|-----|-----
user1 | 1 | ...
user4 | 2 | ...
user2 | 3 | ...
user1 | 4 | ...
user2 | 5 | ...
user1 | 6 | ...
user2 | 7 | ...
(row "no" isnt needed in my question, just to show that there are additional rows within the table!)
So, now i would like to make "SELECT * FROM user-table WHERE user_name='user1'", BUT instead of the output, i would like to get the no. of results! (i know how to realize this in php, but is it possible to do that allready within the MySQL querry itself?)
AND if thats possible, is it also be possible to do the above but with every user_name in 1 querry, instead of having 1 querry for every user?
Well, quite a lot stuff, but maybe you can help me here 🙂
thx a lot,
Duncan McLord