Forum Moderators: coopster
I have a problem, I want to be able to display the results from a mysql database, say for example the field in the database called date contained the following few records
Thursday 20 January 2007
Thursday 20 Feburary 2007
Wednesday 12 March 2006
Thursday 20 March 2007
Friday 21 March 2007
Thursday 20 April 2007
this field is a varchat field in the mysql database, how can i perform a query that will return each record based on the MONTH part of the string, for example if i choose March from the list it will return
Wednesday 12 March 2006
Thursday 20 March 2007
Friday 21 March 2007
and the other results will be ignored, I thought about using strstr() from php but then realized that might not be what I need, can anyone help out here?
Cheers
ChrisW
I mean if i choose June from a list all of the records for june regardless of year or anything will be displayed
e.g
select all from posts where date_field contains June
the field will usually contain a longer string like
Saturday 2nd June 2007
I just wanted to show the records for june from my database