Hello, I been having a problem here for long time that I can't fix if anyone has a suggestion please post it.
Now let me explain what the problem.
In my PHP code I run this sql statement which suppose to retriave the most recent records in DESC order by time stamp. Here is the select statement:
"select (all my columns here) from DB order by time(timestamp) DESC limit 15".
This works and it pulls up all last 15 records. I also have a column varchar which holds company names and its called (company_name). All I need to do is make the records I pull up to be in alphabetical order by that company_name column.
This is what I tried
"select (all my columns here) from DB order by time DESC, company_name limit 15".
This doesn't do any changes that are caused by the 1st statement.
I also tried group by company_name. But it Doesn't work also.
To summirize this: All I want to do is pull up last 15 records that been entered and put them in alphabetical order.
If you can suggest something please do so.
Thank you
- Vadim
icq #10363340
Now let me explain what the problem.
In my PHP code I run this sql statement which suppose to retriave the most recent records in DESC order by time stamp. Here is the select statement:
"select (all my columns here) from DB order by time(timestamp) DESC limit 15".
This works and it pulls up all last 15 records. I also have a column varchar which holds company names and its called (company_name). All I need to do is make the records I pull up to be in alphabetical order by that company_name column.
This is what I tried
"select (all my columns here) from DB order by time DESC, company_name limit 15".
This doesn't do any changes that are caused by the 1st statement.
I also tried group by company_name. But it Doesn't work also.
To summirize this: All I want to do is pull up last 15 records that been entered and put them in alphabetical order.
If you can suggest something please do so.
Thank you
- Vadim
icq #10363340