Re: query, INTERVAL problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ok make it as

 $sql = "SELECT doc_id, exam_date  FROM exams WHERE doc_id='$doc_id' and
exam_type_id= '1' and result='PASS' and '$due_date' > (exam_date + INTERVAL
11 MONTH) ";

and still have a diffrent records when i use '20030501' than '2003-05-01'



"Jason Wong" <php-db@gremlins.biz> wrote in message
200305271748.27813.php-db@gremlins.biz">news:200305271748.27813.php-db@gremlins.biz...
> 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"
> */
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux