×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
There are different ways to do it, but your where clause could look something like this:
where XMittalDate between $startDate and $endDate
From: "Shannon ODonnell" <sodonnell@xxxxxxxxxxxxxxxxxxxxxxxxx>
To:"'Web Enabling the AS400 / iSeries'" <web400@xxxxxxxxxxxx>
Date: 1/13/2010 11:27 AM
Subject: [WEB400] SQL Date Range
I want to select a group of dates based on date range in a PHP app from a
MySQL database.
Assume the table name is xmittalheader and the date field is named:
XMittalDate and is in the format in the MySQL table like this: 11/02/2009
Further assume $startDate and $endDate are being brought into the PHP via a
POST from a form.
Would this be the correct syntax?
$results = mysqli_query($db, "SELECT * FROM xmittalheader WHERE XMittalDate
BETWEEN ".$startDate." and ".$endDate);
Thanks!
Shannon O'Donnell
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.