hiya,
does anyone know how to influence the order in which a mysql db returns the desired result set???
what I mean is, I am getting say 200 records from a query and I want to display them in pages of 50 records, however I want specific records to appear on the first page (i.e in the first 50), but I do not know which records I want on the first page until the query is done.
I am curently getting a count of the record set and then getting my records for display using limit based on the count from the first query. Sorts only work on the limit ed results set, so the records i want to appear on the first page appear at the top of whatever page they end up on.
It seems that what I need to do is order the results set before I get the records using limit, effectively sorting it before I get it.
does anyone have any ideas???
does anyone understand what I am on about??
James
does anyone know how to influence the order in which a mysql db returns the desired result set???
what I mean is, I am getting say 200 records from a query and I want to display them in pages of 50 records, however I want specific records to appear on the first page (i.e in the first 50), but I do not know which records I want on the first page until the query is done.
I am curently getting a count of the record set and then getting my records for display using limit based on the count from the first query. Sorts only work on the limit ed results set, so the records i want to appear on the first page appear at the top of whatever page they end up on.
It seems that what I need to do is order the results set before I get the records using limit, effectively sorting it before I get it.
does anyone have any ideas???
does anyone understand what I am on about??
James