RE: Getting the previous months documents

2006-05-02 Thread Peter Lauri
ntent']; $id=$row['id']; ?> Thanks for your help. - Original Message - From: "Peter Lauri" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; Sent: Tuesday, May 02, 2006 10:20 AM Subject: RE: Getting the previous months documents >I did this, sorry

RE: Getting the previous months documents

2006-05-02 Thread Peter Lauri
nt or will I have to change the field to DATE? Ross - Original Message - From: "Peter Lauri" <[EMAIL PROTECTED]> To: Sent: Tuesday, May 02, 2006 9:06 AM Subject: RE: Getting the previous months documents > You should start by using MySQL date as the standard for

Re: Getting the previous months documents

2006-05-02 Thread ross
change the field to DATE? Ross - Original Message - From: "Peter Lauri" <[EMAIL PROTECTED]> To: Sent: Tuesday, May 02, 2006 9:06 AM Subject: RE: Getting the previous months documents You should start by using MySQL date as the standard for date: -MM-DD After t

RE: Getting the previous months documents

2006-05-02 Thread Peter Lauri
You should start by using MySQL date as the standard for date: -MM-DD After that it is simple: SELECT * FROM documents WHERE doc_date<2006-05-02 ORDER BY doc_date DESC LIMIT 1; Othervise you could use MySQL function to take sub strings and create a field in the query that extract it as 06-05