Topic awaiting preservation: How to order by 2 columns in 2 tables (Page 1 of 1) |
|
---|---|
Maniac (V) Mad Scientist From: Rochester, New York, USA |
posted 05-30-2002 19:09
I have 2 tables, one holds rankings and the other holds content. The content table is ordered by a bigint autoincrement. The rankings table is ordered by the same id held in its table. The problem here is that not all the content elements have a ranking. |
Maniac (V) Mad Scientist with Finglongers From: Cell 53, East Wing |
posted 05-30-2002 19:38
WarMage: Could you not first pull out everything with a rank and then pull out everything without one. I'm not sure how simple the latter would be and, if it can't be done simply, you may have to store the IDs with a ranking in an array as you output them then do a second search and just not echo a result that has a matching ID in the array. That is the why I'd try it but I'd need to play around with things. |
Maniac (V) Mad Scientist From: Rochester, New York, USA |
posted 05-30-2002 20:45 |
Paranoid (IV) Inmate From: 127.0.0.1 |
posted 05-31-2002 16:22 |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 05-31-2002 17:47
How about something like |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 05-31-2002 18:48
Wait let's see that's not gonna return all the content id's |
Maniac (V) Mad Scientist From: Rochester, New York, USA |
posted 06-01-2002 15:11 |
Maniac (V) Mad Scientist From: Rochester, New York, USA |
posted 06-01-2002 15:57 |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 06-01-2002 20:42
The distinct is just a habit I got into at work mostly because everyone else does it it just excludes duplicate entries and is not really necessary here. |
Maniac (V) Mad Scientist From: Rochester, New York, USA |
posted 06-02-2002 03:04 |