Chuck, > select * from orderheader where orderid like '$date' ; > The $date variable equals 20030124%
Am I right to suppose your query doesn't work? Did you try something like: $sql = "select * from orderheader where orderid like '$date'"; print $sql; in your application? If have not enough information, but a possible bug could be that $date is not what you expect it to be, but rather something like: 20030124\% HTH, -- Stefan Hinz <[EMAIL PROTECTED]> Geschäftsführer / CEO iConnect GmbH <http://iConnect.de> Heesestr. 6, 12169 Berlin (Germany) Tel: +49 30 7970948-0 Fax: +49 30 7970948-3 ----- Original Message ----- From: "Chuck Barnett" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 24, 2003 6:33 PM Subject: question about date range > Hi, I inherited a db that has a varchar(30) column that holds a date/time > stamp in the form of YYYYMMDDHHmmss (ex: 20030124093952) > > Well I want to select a range based on the first 8 characters(YYYYMMDD). > > I currently select a single day by > > select * from orderheader where orderid like '$date' ; > > The $date variable equals 20030124% > > What can I do to get this range selection query to work? > > Thanks, > Chuck Barnett > > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php