Ysgrifennodd Tim McIntyre:
Next pint is on me Peter;-) The following turned out to be exactly
what I needed:
SELECT s1.id
FROM status_histories s1
WHERE s1.type = 'StatusHistoryOrder'
AND s1.code = 1
AND s1.created_at = (SELECT MAX(s2.created_at)
FROM statu
Next pint is on me Peter;-) The following turned out to be exactly
what I needed:
SELECT s1.id
FROM status_histories s1
WHERE s1.type = 'StatusHistoryOrder'
AND s1.code = 1
AND s1.created_at = (SELECT MAX(s2.created_at)
FROM status_histories s2
Ysgrifennodd Tim McIntyre:
I tried that Peter and for some reason it's still selecting the oldest
date not the newest??? Seems odd? Also I'd really like to just select
id because I'll be using this in a subselect.
Thanks!
Tim
SELECT s1.order_id
FROM status_histories s1
WHERE s1.type = 'Statu
yre:
Thanks for the responses guys however I was running out the door
yesterday and I oversimplified my problem. Sorry about that, let
me try again.
Here is my "status_histories" table with some data:
id order_id code
type
Ysgrifennodd Tim McIntyre:
Thanks for the responses guys however I was running out the door
yesterday and I oversimplified my problem. Sorry about that, let me
try again.
Here is my "status_histories" table with some data:
id order_id code
Thanks for the responses guys however I was running out the door
yesterday and I oversimplified my problem. Sorry about that, let me
try again.
Here is my "status_histories" table with some data:
id order_id code type
create
Jalene,
Friday, November 08, 2002, 1:29:53 AM, you wrote:
JJ> I have a Redhat linux box which has MySQL 3.23.52 loaded on it. I have
JJ> mysql front loaded on a windows xp box which I am trying to use to
JJ> connect to the mysql server. The error I am getting when trying to make
JJ> a connectio
I have a Redhat linux box which has MySQL 3.23.52 loaded on it. I have
mysql front loaded on a windows xp box which I am trying to use to
connect to the mysql server. The error I am getting when trying to make
a connection is 2013 - lost connection to MySQL server during query. I
have checked t