String Convert

From: Date: Mon, 11 Feb 2002 16:40:45 +0000
Subject: String Convert
Groups: php.db 
Request: Send a blank email to php-db+get-16806@lists.php.net to get a copy of this message
I have a MySQL table called salesdata in which there is a field called period_name of type varchar. The data is imported from a CSV file in the following format: Sep-00 Oct-00 Nov-00 ... Dec-01 I need to run the following query in order to select a range of periods: Select distinct period_name from salesdata where salesperson = '$dbname' and period_name between '$start_period' and '$end_period' Does anyone know how to get around using a between statement on a string field? I have experimented settype, but with no luck. Any suggestions would be appreciated. Thanks, Randy Rankin

« previous php.db (#16806) next »