> The query does not error out it just does not give any records, and I
Know

What part of "The query does not error out" do you not understand.

Why are there so many people willing to say what is wrong with a code but when it 
comes to
A solution that go silent.

I find that the ones most often to find flaws in someones code, are the ones who never 
provide
Answers.

---------------------------------------------------------------------------
Chris Kay
Technical Support - Techex Communications 
Website: www.techex.com.au   Email: [EMAIL PROTECTED]
Telephone: 1300 88 111 2 - Fax: (02) 9970 5788 
Address: Suite 13, 5 Vuko Place, Warriewood, NSW 2102 
Platinum Channel Partner of the Year - Request DSL - Broadband for Business
---------------------------------------------------------------------------

> -----Original Message-----
> From: John Holmes [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, 14 June 2002 1:26 PM
> To: Chris Kay; 'PHP General List'
> Subject: RE: [PHP] MySQL Query Help!!!!
> 
> 
> Man, where do I start. There could be so many things wrong. 
> First of all, this is a PHP list, not MySQL. Second, use 
> MySQL_error() after you issue a query to see if an error was 
> returned http://www.php.net/mysql_error. Third, in this line:
> 
> 'detail_start_date_y,detail_start_date_m,detail_start_date_d,d
> etail_star
> t_time_h,detail_start_time_m' <= '$ttwo'
> 
> You are comparing the literal string of 'detail... ' is less 
> than or equal to a string like '200203041234' or something. 
> That's going to fail. 
> 
> You need to go back to your SQL books...
> 
> ---John Holmes...
> 
> > -----Original Message-----
> > From: Chris Kay [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, June 13, 2002 7:33 PM
> > To: PHP General List
> > Subject: [PHP] MySQL Query Help!!!!
> > 
> > 
> > I have a rather longer query which I would like to get all records
> past
> > todays date.
> > Here is my query
> > 
> > $ttwo = date("YmdGi");
> > 
> > $dbq = select("select detail.*, type.type_name, status.status_name, 
> > staff.staff_name, source.source_long, source.source_short 
> from detail, 
> > type, status, staff, source where type.type_id = 
> detail.detail_type && 
> > status.status_id = detail.detail_status &&
> > staff.staff_id = detail.detail_staff && source.source_short =
> > detail.detail_source &&
> >
> 'detail_start_date_y,detail_start_date_m,detail_start_date_d,d
> etail_star
> t_
> > time_h,detail_start_time_m' <= '$ttwo' order by
> detail.detail_start_date_m
> > DESC, detail.detail_start_date_d DESC");
> > 
> > The query works fine before I try to get all records in the 
> furure as 
> > shown below
> > 
> >
> 'detail_start_date_y,detail_start_date_m,detail_start_date_d,d
> etail_star
> t_
> > time_h,detail_start_time_m' <= '$ttwo'
> > 
> > The query does not error out it just does not give any 
> records, and I
> know
> > there are 4 records
> > 
> > Detail_start_date_y = 4 digit year
> > Detail_start_date_m = 2 digit month
> > Deatil_start_date_d = 2 digit day
> > Detail_start_time_h = 24 hour time
> > 
> > Can anyone see what I am doing wrong?
> > 
> > Thanks in advance.
> > 
> >
> --------------------------------------------------------------
> ----------
> --
> > -
> > Chris Kay
> > Technical Support - Techex Communications
> > Website: www.techex.com.au   Email: [EMAIL PROTECTED]
> > Telephone: 1300 88 111 2 - Fax: (02) 9970 5788
> > Address: Suite 13, 5 Vuko Place, Warriewood, NSW 2102 
> Platinum Channel 
> > Partner of the Year - Request DSL - Broadband for Business
> >
> --------------------------------------------------------------
> ----------
> --
> > -
> > 
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 

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

Reply via email to