Re: select row with greatest valued column - let me try again

2006-12-08 Thread Peter Bradley
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

Re: select row with greatest valued column - let me try again

2006-12-08 Thread 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 status_histories s2

Re: select row with greatest valued column - let me try again

2006-12-08 Thread Peter Bradley
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

Re: select row with greatest valued column - let me try again

2006-12-08 Thread Tim McIntyre
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

Re: select row with greatest valued column - let me try again

2006-12-08 Thread Peter Bradley
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

Re: select row with greatest valued column - let me try again

2006-12-08 Thread 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 type create

re: try again

2002-11-08 Thread Egor Egorov
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

try again

2002-11-07 Thread Jalene Joyner
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