Say I have this schema
CREATE TABLE temp (
EntityId BIGINT AUTO_INCREMENT PRIMARY KEY,
CreationTime DEFAULT NOW()
);
Now let's say I want to find all rows created within the last 24 hours. If I do
select * from temp where CreationTime > DATE_SUB(NOW(), INTERVAL 24 HOUR)
that's going to do
On Sun, Mar 16, 2008 at 5:48 AM, Waynn Lue <[EMAIL PROTECTED]> wrote:
> Say I have this schema
>
> CREATE TABLE temp (
> EntityId BIGINT AUTO_INCREMENT PRIMARY KEY,
> CreationTime DEFAULT NOW()
> );
>
> Now let's say I want to find all rows created within the last 24 hours. If
> I do
>
>
Hi MySQL maestros,
I'm setting up a table containing artistic terms in a number of
languages. Here is a brief extract:
ID UK EnglishFrenchItalian
257gouache gouache gouache
436portrait portrait ritratto
575watercolour aquarelle acquar
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:
Sent: Sunday, March 16, 2008 1:42 AM
Subject: how to use index with order b
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 user
On Sun, Mar 16, 2008 at 8:16 AM, James Newton
<[EMAIL PROTECTED]> wrote:
> Hi MySQL maestros,
>
> I'm setting up a table containing artistic terms in a number of
> languages. Here is a brief extract:
>
>
> ID UK EnglishFrenchItalian
>
> 257gouache gouache gouach