Rob Wultsch schrieb:
On Mon, Mar 17, 2008 at 4:36 AM, Arthur Fuller [EMAIL PROTECTED] wrote:
I love when this happens. I woke in the middle of the night with an idea for
you. It now occurs to me that the query you want is dead simple. It just
took me a while to see:
SELECT *
FROM messages
On Mon, Mar 17, 2008 at 11:35 PM, Sebastian Mendel
[EMAIL PROTECTED] wrote:
hu? ... i am pretty sure i had a similar problem, i solved this by adding
the column with the order to the index, which 'solved' the filesort (except
the ORDER is in reverse)
I don't think we can lose the filesort
Rob Wultsch schrieb:
On Sat, Mar 15, 2008 at 2:42 PM, Nacho Garcia [EMAIL PROTECTED] wrote:
Hi, im having troubles with one query, hope someone can help.
on this table:
messages:
id_fromint(10)
id_toint(10)
textvarchar(1000)
time
with index on id_form and id_to
i want to
I love when this happens. I woke in the middle of the night with an idea for
you. It now occurs to me that the query you want is dead simple. It just
took me a while to see:
SELECT *
FROM messages
WHERE id_from = 1 AND id_to = 2
UNION
SELECT *
FROM messages
WHERE id_from = 2 AND id_to = 1
ORDER
On Mon, Mar 17, 2008 at 4:36 AM, Arthur Fuller [EMAIL PROTECTED] wrote:
I love when this happens. I woke in the middle of the night with an idea for
you. It now occurs to me that the query you want is dead simple. It just
took me a while to see:
SELECT *
FROM messages
WHERE id_from = 1
I would suggest u use
SELECT *
FROM messages
WHERE id_from between 1 and 2
AND id_to between 1 and 2
ORDER BY time
Hope this helps.
Velen
- Original Message -
From: Nacho Garcia [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Sunday, March 16, 2008 1:42 AM
Subject: how to use
On Sun, Mar 16, 2008 at 10:36 AM, Velen [EMAIL PROTECTED] wrote:
I would suggest u use
SELECT *
FROM messages
WHERE id_from between 1 and 2
AND id_to between 1 and 2
ORDER BY time
That would only be applicable if he mandated that his users only send
messages to other users with
Hi, im having troubles with one query, hope someone can help.
on this table:
messages:
id_fromint(10)
id_toint(10)
textvarchar(1000)
time
with index on id_form and id_to
i want to get messages sent from one user to another and vice versa order by
time.
let say we want to search
On Sat, Mar 15, 2008 at 2:42 PM, Nacho Garcia [EMAIL PROTECTED] wrote:
Hi, im having troubles with one query, hope someone can help.
on this table:
messages:
id_fromint(10)
id_toint(10)
textvarchar(1000)
time
with index on id_form and id_to
i want to get messages