On Thu, Jan 8, 2015 at 1:00 PM, DealTek <dealtek@xxxxxxxxx> wrote: > semi newbie > > Hi all, > > 1 - I do a query for multi records - and sort a certain way > > 2 - then I need to capture/edit just the first found record in the result > (no user interaction) > > > > Q: using php - How do I set a variable to the first first found record in > the result and do more with this record? > > > > -- > Thanks, > Dave - DealTek > dealtek@xxxxxxxxx > [db-15] > > To do it on the data side... For mysql it'd be something like select * from table order by date desc LIMIT 1 For mssql select TOP 1 * from table order by date desc