Hi,
It comes from external source together with Relevance value (float),
where the first ID has highest relevance and subsequent IDs are in
decreasing order.
For example:
109k7 1.79
s3x6 1.34
sxmns 1.21
wt57 0.93
I could use these numbers in the query as well if it helps.
PaPa
On
Papalagi Pakeha schrieb:
Hello,
I have a query like:
SELECT id, start_date FROM iddt WHERE id IN ('109k7','s3x6','sxmns','wt57');
which gives me:
+---+-+
| id| start_date |
+---+-+
| 109k7 | 2007-10-07 12:06:58 |
| sxmns |
On 10/30/07, Sebastian Mendel [EMAIL PROTECTED] wrote:
Papalagi Pakeha schrieb:
Hello,
I have a query like:
SELECT id, start_date FROM iddt WHERE id IN ('109k7','s3x6','sxmns','wt57');
which gives me:
+---+-+
| id| start_date |
Hi,
what you probably want is
SELECT id, start_date FROM iddt WHERE id IN
('109k7','s3x6','sxmns','wt57')
ORDER BY FIELD(id,'109k7','s3x6','sxmns','wt57')
/Johan
Papalagi Pakeha skrev:
On 10/30/07, Sebastian Mendel [EMAIL PROTECTED] wrote:
Papalagi Pakeha schrieb:
Hello,
I have a query
On 10/30/07, Johan Höök [EMAIL PROTECTED] wrote:
Hi,
what you probably want is
SELECT id, start_date FROM iddt WHERE id IN
('109k7','s3x6','sxmns','wt57')
ORDER BY FIELD(id,'109k7','s3x6','sxmns','wt57')
That's exactly it! Thanks a lot :-)
Just for the record, here's the FIELD() function
PaPa,
It comes from external source together with Relevance value (float),
Then you need to ORDER BY that func.
PB
-
Papalagi Pakeha wrote:
Hi,
It comes from external source together with Relevance value (float),
where the first ID has highest relevance and subsequent IDs are in
Hello,
I have a query like:
SELECT id, start_date FROM iddt WHERE id IN ('109k7','s3x6','sxmns','wt57');
which gives me:
+---+-+
| id| start_date |
+---+-+
| 109k7 | 2007-10-07 12:06:58 |
| sxmns | 2007-10-06 02:17:30 |
| wt57 |
I.e. the ideal output would be:
+---+-+
| id| start_date |
+---+-+
| 109k7 | 2007-10-07 12:06:58 |
| s3x6 | 2007-10-07 08:58:20 |
| wt57 | 2007-10-07 15:57:37 |
| sxmns | 2007-10-06 02:17:30 |
+---+-+
What
, 2002 4:00 AM
To: '[EMAIL PROTECTED]'
Subject: Order by list?
Hi all,
I'm executing the follow very simple type of query to select entries from a
list:
select entryid, entryinfo from mytable where entryid in ('id7', 'id4',
'id2', 'id5')
and, even though I don't specify any sorting order
Hi all,
I'm executing the follow very simple type of query to select entries from a
list:
select entryid, entryinfo from mytable where entryid in ('id7', 'id4',
'id2', 'id5')
and, even though I don't specify any sorting order, MySQL sorts
alphabetically
by the field entryid (which happens to
At 20:00 -0800 3/11/02, George Marnellos wrote:
Hi all,
I'm executing the follow very simple type of query to select entries from a
list:
select entryid, entryinfo from mytable where entryid in ('id7', 'id4',
'id2', 'id5')
and, even though I don't specify any sorting order, MySQL sorts
11 matches
Mail list logo