[snip]
Sorry that this has degenerated into a MySQL question rather than PHP.
I was originally looking for how people handled it in PHP.
---
Actually it didn't degenerate, it was a SQL question all along. Unless
you had a desire to build sortable arrays in PHP this type of sort
should always be don
[snip]
SELECT *
FROM Course
ORDER BY locationID ASC
Now the ORDER BY can be any one of five things based on the variable
passed by the hyperlink for the column they clicked on (location,
course, date, category, and instructor
[/snip]
If you had a JOIN to the location table you could order by the
> The actual SELECT statement is as follows:
> $sqlCourses="SELECT * FROM " . $tbl_courses . " WHERE courseDate > '" .
date("Y-m-d") . "' ORDER BY " . $orderBy . " ASC";
> the $orderBy variable is set via $_GET['orderBy'] which is sent by the
> table headers as below:
I'm curious why you aren't jo
Hello Jay,
Tuesday, April 19, 2005, 1:28:25 PM, you wrote:
J> Normalization has no effect on sort order where any DB is concerned.
J> Sort order is determined in the sort clause in the query. So if you want
J> to sort by location and you are using MySQL your ORDER BY clause should
J> be location.
4 matches
Mail list logo