Re: query, INTERVAL problem
| From: | Jason Wong | Date: | Tue, 27 May 2003 09:48:27 +0000 |
| Subject: | Re: query, INTERVAL problem | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-28078@lists.php.net to get a copy of this message | ||
On Tuesday 27 May 2003 17:03, nabil wrote:
> No Jason, what I meant that I submit the date value from a form to MySQL,
> to execute a query as I said below, and it returns deferent value for that
> ...
>
> when I send $due_date as '20030501' the query return a different than
> '2003-05-01'
>
> Hope I make clear..
Nope, still not clear at all. Your query is:
> $sql = "SELECT doc_id FROM exams WHERE doc_id='$doc_id' and exam_type_id=
> '1' and result='PASS' and '$due_date' > (exam_date + INTERVAL
> 11 MONTH) ";
You're only selecting doc_id. Are you saying that performing the above query
doc_id is '2003-05-01' !?!
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-db
------------------------------------------
/*
Kludge, n.:
An ill-assorted collection of poorly-matching parts, forming a
distressing whole.
-- Jackson Granholm, "Datamation"
*/