If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Searching Dates - PHP/mySQL

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-10-04, 11:22
timclaason timclaason is offline
Registered User
 
Join Date: Nov 2003
Posts: 9
Searching Dates - PHP/mySQL

I've got a little bit of a PHP/mySQL issue that I'm sure some of you super-programmers can solve.

In a mySQL database, I've got a table with a field called 'thedate'. As you might guess, 'thedate' contains dates.

The only problem is, 'thedate' is a varchar field (not a date field). On top of that, 'thedate' is in the format MM-DD-YY.

I have a form that a user enters in the startmonth, startyear, endmonth, endyear, and the goal is to have a PHP script search 'thedate' for all records that fit inside this criteria.

My question is, is there a combination of SQL statements and built-in PHP functions that can perform this task, or will I need an algorithm to do this?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On