Page 1 of 1

date query

Posted: Fri Jul 15, 2005 6:54 am
by gurjit
hi all,

I have this query which counts the number of hits per week. It gives the following results:

11/07/05 - 17/07/05 - 3410

04/07/05 - 10/07/05 - 5618

27/06/05 - 03/07/05 - 1966


What i want it to do is also count for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

<?php
$sql_dailycountP = "select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS end_of_week, DATE_FORMAT(h_date, \"%u %M %Y\") AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_FORMAT(h_date, \"%M %Y\") = DATE_FORMAT(NOW(), \"%M %Y\") AND h_group_item='stagecoach' GROUP BY week ORDER BY week DESC";

?>
ber of hits per week. It gives the following results:

11/07/05 - 17/07/05 - 3410

04/07/05 - 10/07/05 - 5618

27/06/05 - 03/07/05 - 1966


What i want it to do is also count for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

&lt;?php
$sql_dailycountP = &quote;select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \&quote;%d/%m/%y\&quote; ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \&quote;%d/%m/%y\&quote; ) AS end_of_week, DATE_FORMAT(h_date, \&quote;%u %M %Y\&quote;) AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_FORMAT(h_date,wing results:

11/07/05 - 17/07/05  - 3410   
   
04/07/05 - 10/07/05  - 5618   
   
27/06/05 - 03/07/05  - 1966 


What i want it to do is also count for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

&lt;?php
$sql_dailycountP = &quote;select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \&quote;%d/%m/%y\&quote; ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \&quote;%d/%m/%y\&quote; ) AS end_of_week, DATE_FORMAT(h_date, \&quote;%u %M %
04/07/05 - 10/07/05  - 5618   
   
27/06/05 - 03/07/05  - 1966 


What i want it to do is also count for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

&lt;?php
$sql_dailycountP = &quote;select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \&quote;%d/%m/%y\&quote; ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \&quote;%d/%m/%y\&quote; ) AS end_of_week, DATE_FORMAT(h_date, \&quote;%u %M %Y\&quote;) AS week, SUM(h_count) AS wee/05  - 3410   
   
04/07/05 - 10/07/05  - 5618   
   
27/06/05 - 03/07/05  - 1966 


What i want it to do is also count for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

<?php
$sql_dailycountP = "select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_datthis query which counts the number of hits per week. It gives the following results:

11/07/05 - 17/07/05  - 3410   
   
04/07/05 - 10/07/05  - 5618   
   
27/06/05 - 03/07/05  - 1966 


What i want it to do is also count for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

&lt;?php
$sql_dailycountP = &quote;select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \&quote;%d/%m/%y\&quote; ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \&quote;%d/%m/%y\&quote; ) AS end_of_week, DATE_FORMAT(h_date, \&quote;%u %M %Y\&quote;) AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_FORMAT(h_date, \&quote;%M %Y\&quote;) = DATE_FORMAT(NOW(), \&quote;%M %Y\&quote;) AND h_group_item='stagecoach' GROUP BY week ORDER BYthis query which counts the number of hits per week. It gives the following results:

11/07/05 - 17/07/05  - 3410   
   
04/07/05 - 10/07/05  - 5618   
   
27/06/05 - 03/07/05  - 1966 


What i want it to do is also count for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

<?php
$sql_dailycountP = "select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS end_of_week, DATE_FORMAT(h_date, \"%u %M %Y\") AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_FORMAT(h_date, \"%M %Y\") = DATE_FORMAT(NOW(), \"%M %Y\") AND h_group_item='stagecoach' GROUP BY week ORDER BY week DESC";

?>
SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS end_of_week, DATE_FORMAT(h_date, \"%u %M %Y\") AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_FORMAT(h_date, \"%M %Y\") = DATE_FORMAT(NOW(), \"%M %Y\") AND h_group_item='stagecoach' GROUP BY week ORDER BY week DESC";

?>
HERE DATE_FORMAT(h_date, \"%M %Y\") = DATE_FORMAT(NOW(), \"%M %Y\") AND h_group_item='stagecoach' GROUP BY week ORDER BY week DESC";

?>
owing results:

11/07/05 - 17/07/05 - 3410

04/07/05 - 10/07/05 - 5618

27/06/05 - 03/07/05 - 1966


What i want it to do is also count for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

<?php
$sql_dailycountP = "select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS end_of_week, DATE_FORMAT(h_date, \"%u %M %Y\") AS w/05 - 17/07/05  - 3410   
   
04/07/05 - 10/07/05  - 5618   
   
27/06/05 - 03/07/05  - 1966 


What i want it to do is also count for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

<?php
$sql_dailycountP = "select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \&quote;%d/%m/%y\&quote; ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTEits per week. It gives the following results:

11/07/05 - 17/07/05  - 3410   
   
04/07/05 - 10/07/05  - 5618   
   
27/06/05 - 03/07/05  - 1966 


What i want it to do is also count for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

<?php
$sql_dailycountP = "select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS end_of_week, DATE_FORMAT(h_date, \"%u %M %Y\") AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_FORMAT(h_date, \"%M %Y\") = DATE_FORMAT(NOW(), \"%M %Y\") AND h_group_item='stagecoach' GROUP BY week ORDER BY week DESC";

?>

What i want it to do is also count for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

<?php
$sql_dailycountP = &quote;select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \&quote;%d/%m/%y\&quote; ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \&quote;%d/%m/%y\&quote; ) AS end_of_week, DATE_FORMAT(h_date, \&quote;%u %M %Y\&quote;) AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_FORMAT(h_date, \&quote;%M %Y\&quote;) = DATE_FORMAT(NOW(), \&quote;%M %Y\&quote;) AND h_group_item='stagecoach' GR

how can i do that?

heres my query:

Code: Select all

<?php
$sql_dailycountP = "select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS end_of_week, DATE_FORMAT(h_date, \"%u %M %Y\") AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_FORMAT(h_date, \"%M %Y\") = DATE_FORMAT(NOW(), \&ich counts the number of hits per week. It gives the following results:

11/07/05 - 17/07/05  - 3410   
   
04/07/05 - 10/07/05  - 5618   
   
27/06/05 - 03/07/05  - 1966 


What i want it to do is also count for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

<?php
$sql_dailycountP = "select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS end_of_week, DATE_FORMAT(h_date, \"%u %M %Y\") AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_FORMAT(h_date, \"%M %Y\") = DATE_FORMAT(NOW(), \"%M %Y\") AND h_group_item='stagecoach' GROUP BY week ORDER BY week DESC";

?>
Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

&lt;?php
$sql_dailycountP = &quote;select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \&quote;%d/%m/%y\&quote; ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \&quote;%d/%m/%y\&quote; ) AS end_of_week, DATE_FORMAT(h_date, \&quote;%u %M %Y\&quote;) AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_FORMAT(h_date, \&quote;%M %Y\&quote;) = DATE_FORMAT(NOW(), \&quote;%M %Y\&quote;) AND h_group_item='stagecoach' GROUP BY week ORDER BY week DESC&quote;;

?&g
heres my query:

Code: Select all

<?php
$sql_dailycountP = "select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS end_of_week, DATE_FORMAT(h_date, \"%u %M %Y\") AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_FORMAT(h_date, \"%M %Y\") = DATE_FORMAT(NOW(), \"%M %Y\") AND h_group_item='stagecoach' GROUP BY week ORDER BY week DESC";

?>
uote;) AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_FORMAT(h_date, \"%M %Y\") = DATE_FORMAT(NOW(), \"%M %Y\") AND h_group_item='stagecoach' GROUP BY week ORDER BY week DESC";

?>
want it to do is also count for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

<?php
$sql_dailycountP = "select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \&quote;%d/%m/%y\&quote; ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \&quote;%d/%m/%y\&quote; ) AS end_of_week, DATE_FORMAT(h_date, \&quote;%u %M %Y\&quote;) AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_FORMAT(h_date, r the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

<?php
$sql_dailycountP = "select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS end_of_week, DATE_FORMAT(h_date, \"%u %M %Y\") AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_FORMAT(h_date, \"%M %Y\") = DATE_FORMAT(NOW(), \"%Mstart_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS end_of_week, DATE_FORMAT(h_date, \"%u %M %Y\") AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_FORMAT(h_date, \"%M %Y\") = DATE_FORMAT(NOW(), \"%M %Y\") AND h_group_item='stagecoach' GROUP BY week ORDER BY week DESC";

?>
this query which counts the number of hits per week. It gives the following results:

11/07/05 - 17/07/05 - 3410

04/07/05 - 10/07/05 - 5618

27/06/05 - 03/07/05 - 1966


What i want it to do is also count for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

<?php
$sql_dailycountP = "select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS end_of_week, DATE_FORMAT(h_date, \"%u %M %Y\") AS week, SUM(h_count) AS week_tomp;lt;?php
$sql_dailycountP = "select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS end_of_week, DATE_FORMAT(h_date, \"%u %M %Y\") AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_FORMAT(h_date, \"%M %Y\") = DATE_FORMAT(NOW(), \"%M %Y\") AND h_group_item='stagecoach' GROUP BY week ORDER BY week DESC";

?>
umber of hits per week. It gives the following results:

11/07/05 - 17/07/05 - 3410

04/07/05 - 10/07/05 - 5618

27/06/05 - 03/07/05 - 1966


What i want it to do is also count for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

&lt;?php
$sql_dailycountP = &quote;select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \&quote;%d/%m/%y\&quote; ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \&quote;%d/%m/%y\&quote; ) AS end_of_week, DATE_FORMAT(h_date, \&quote;%u %M %Y\&quote;) AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_FORMAT(h_date, \&quote;%M %Y\&quote;) = DATE_FORMAT(NOW(), \&quote;%M %Y\&quote;) AND h_group_item='stagecoach' GROUP BY week ORDER BY03/07/05  - 1966 


What i want it to do is also count for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

<?php
$sql_dailycountP = "select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS end_of_week, DATE_FORMAT(h_date, \"%u %M %Y\") AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_FORMAT(h_date, \"%M %Y\") = DATE_FORMAT(NOW(), \"%M %Y\") AND h_group_item='stagecoach' GROUP BY week ORDER BY week DESC";

?>
number of hits per week. It gives the following results:

11/07/05 - 17/07/05 - 3410

04/07/05 - 10/07/05 - 5618

27/06/05 - 03/07/05 - 1966


What i want it to do is also count for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

<?php
$sql_dailycountP = "select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \&quote;%d/%m/%y\&quote; ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \&quote;%d/%m/%y\&quote; ) AS end_of_week, DATE_FORMAT(h_date, \&quote;%u %M %Y\&quote;) AS week, SUM(h_count) AS week_totaount for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

<?php
$sql_dailycountP = "select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\&quote; ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS end_of_week, DATE_FORMAT(h_date, \"%u %M %Y\&quotat i want it to do is also count for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

<?php
$sql_dailycountP = "select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \&quote;%d/%m/%y\&quote; ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \&quote;%d/%m/%y\&quote; ) AS end_of_week, DATE_FORMAT(h_date, \&quote;%u %M %Y\&quote;) AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_FORMAT(h_date, \&quote;%M %Y\&quote;) = DATE_FORMAT(NOW(), \&quote;%M %Y\&quote;) AND h_group_item='stage$sql_dailycountP = "select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\&quote; ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS end_of_week, DATE_FORMAT(h_date, \"%u %M %Y\") AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcount3/07/05"

how can i do that?

heres my query:

Code: Select all

<?php
$sql_dailycountP = "select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS end_of_week, DATE_FORMAT(h_date, \"%u %M %Y\") AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_FORMAT(h_date, \11/07/05 - 17/07/05  - 3410   
   
04/07/05 - 10/07/05  - 5618   
   
27/06/05 - 03/07/05  - 1966 


What i want it to do is also count for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

<?php
$sql_dailycountP = "select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS end_of_week, DATE_FORMAT(h_date, \"%u %M %Y\") AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_FORMAT(h_date, \"%M %Y\") = DATE_FORMAT(NOW(), \"%M %Y\") AND h_group_item='stagecoach' GROUP BY week ORDER BY week DESC";

?>
h counts the number of hits per week. It gives the following results:

11/07/05 - 17/07/05 - 3410

04/07/05 - 10/07/05 - 5618

27/06/05 - 03/07/05 - 1966


What i want it to do is also count for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

<?php
$sql_dailycountP = "select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS end_of_week, DATE_FORMAT(h_date, \"%u %M %Y\") AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_FORMAT(h_date, \"%M %Y\") = DATE_FORMAT(NOW(), \"%M %Y\") AND h_group_item='stagecoach' GROUP BY week ORDER BY week DESC";

?>
es my query:

Code: Select all

<?php
$sql_dailycountP = "select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \&quote;%d/%m/%y\" ) AS end_of_week, DATE_FORMAT(h_date, \"%u %M %Y\&quothis query which counts the number of hits per week. It gives the following results:

11/07/05 - 17/07/05  - 3410   
   
04/07/05 - 10/07/05  - 5618   
   
27/06/05 - 03/07/05  - 1966 


What i want it to do is also count for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

&lt;?php
$sql_dailycountP = &quote;select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \&quote;%d/%m/%y\&quote; ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \&quote;%d/%m/%y\&quote; ) AS end_of_week, DATE_FORMAT(h_date, \&quote;%u %M %Y\&quote;) AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_FORMAT(h_date, \&quote;%M %Y\&quote;) = DATE_FORMAT(NOW(), \&quote;%M %Y\&quote;) AND h_group_item='stagecoach' GROUP
What i want it to do is also count for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

<?php
$sql_dailycountP = &quote;select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \&quote;%d/%m/%y\&quote; ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_datk. It gives the following results:

11/07/05 - 17/07/05  - 3410   
   
04/07/05 - 10/07/05  - 5618   
   
27/06/05 - 03/07/05  - 1966 


What i want it to do is also count for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

&lt;?php
$sql_dailycountP = &quote;select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \&quote;%d/%m/%y\&quote; ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \&quote;%d/%m/%y\&quote; ) AS end_of_week, DATE_FORMAT(h_date, \&quote;%u %M %Y\&quote;) AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_FORMAT(h_date, \&quote;%M %Y\&quote;) = DATE_FORMAT(NOW(), \&quote;%M %Y\&quote;) AND h_group_item='stagecoach' GROUP BY week ORDER BY week DESC&quote;;

?&gt;
[/php06/05 - 03/07/05  - 1966 


What i want it to do is also count for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

&lt;?php
$sql_dailycountP = &quote;select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS end_of_week, DATE_FORMAT(h_date, \"%u %M %Y\") AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_FORMAT(h_date, \"%M %Y\") = DATE_FORMAT(NOW(), \"%M %Y\") AND h_group_item='stagecoach' GROUP BY week ORDER BY week DESC";

?>
this query which counts the number of hits per week. It gives the following results:

11/07/05 - 17/07/05 - 3410

04/07/05 - 10/07/05 - 5618

27/06/05 - 03/07/05 - 1966


What i want it to do is also count for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

&lt;?php
$sql_dailycountP = &quote;select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \&quote;%d/%m/%y\&quote; ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \&quote;%d/%m/%y\&quote; ) AS end_of_week, DATE_FORMAT(h_date, \&quote;%u %M %Y\&quote;) AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_FORMAT(h_date, \&quote;%M %Y\&quote;) = DATE_FORM07/05  - 1966 


What i want it to do is also count for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

&lt;?php
$sql_dailycountP = &quote;select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS end_of_week, DATE_FORMAT(h_date, \"%u %M %Y\") AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_5  - 5618   
   
27/06/05 - 03/07/05  - 1966 


What i want it to do is also count for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

<?php
$sql_dailycountP = "select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS end_of_week, DATE_FORMAT(h_date, \"%u %M %Y\") AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcoFORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS end_of_week, DATE_FORMAT(h_date, \"%u %M %Y\") AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_FORMAT(h_date, \"%M %Y\") = DATE_FORMAT(NOW(), \"%M %Y\") AND h_group_item='stagecoach' GROUP BY week ORDER BY week DESC";

?>
ery:

Code: Select all

<?php
$sql_dailycountP = "select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS end_of_week, DATE_FORMAT(h_date, \"%u %M %Y\") AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_FORMAT(h_date, \"%M %Y\") = DATE_FORMAT(NOW(), \"%M %Y\") AND h_group_item='stagecoach' GROUP BY week ORDER BY week DESC";

?>
27/06/05 - 03/07/05 - 1966


What i want it to do is also count for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

<?php
$sql_dailycountP = "select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS end_of_week, DATE_FORMAT(h_date, \"%u %M %Y\") AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_FORMAT(h_date, \"%M %Y\") = DATE_FORMAT(NOW(), \"%M %Y\") AND h_group_item='stagecoach' GROUP BY week ORDER BY week DESC";

?>
this query which counts the number of hits per week. It gives the following results:

11/07/05 - 17/07/05 - 3410

04/07/05 - 10/07/05 - 5618

27/06/05 - 03/07/05 - 1966


What i want it to do is also count for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

&lt;?php
$sql_dailycountP = &quote;select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \&quote;%d/%m/%y\&quote; ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \&quote;%d/%m/%y\&quote; ) AS end_of_week, DATE_FORMAT(h_date, \&quote;%u %M %Y\&quote;) AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_FORMAT(h_date, \&quote;%M %Y\&quote;) = DATE_FORMAT(NOW(), \&quote;%M %Y\&quote;) AND h_group_item='stagecoach' GROUP BY week ORDER BY week DESC&quote;;

?&amphe following results:

11/07/05 - 17/07/05  - 3410   
   
04/07/05 - 10/07/05  - 5618   
   
27/06/05 - 03/07/05  - 1966 


What i want it to do is also count for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

<?php
$sql_dailycountP = &quote;select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \&quote;%d/%m/%y\&quote; ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVALthe number of hits per week. It gives the following results:

11/07/05 - 17/07/05  - 3410   
   
04/07/05 - 10/07/05  - 5618   
   
27/06/05 - 03/07/05  - 1966 


What i want it to do is also count for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

<?php
$sql_dailycountP = "select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS end_of_week, DATE_FORMAT(h_date, \"%u %M %Y\") AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_FORMAT(h_date, \"%M %Y\") = DATE_FORMAT(NOW(), \"%M %Y\") AND h_group_item='stagecoach' GROUP BY week ORDER BY week DESC";

?>
;?php
$sql_dailycountP = "select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(

27/06/05 - 03/07/05 - 1966


What i want it to do is also count for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

&lt;?php
$sql_dailycountP = &quote;select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \&quote;%d/%m/%y\&quote; ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \&quote;%d/%m/%y\&quote; ) AS end_of_week, DATE_FORMAT(h_date, \&quote;%u %M %Y\&quote;) AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_FORMAT(h_date, \&quote;%M  - 3410   
   
04/07/05 - 10/07/05  - 5618   
   
27/06/05 - 03/07/05  - 1966 


What i want it to do is also count for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

<?php
$sql_dailycountP = "select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS end_of_week, DATE_FORMAT(h_date, \"%u %M %Y\") AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_FORMAT(h_date, \"%M %Y\") = DATE_FORMAT(NOW(), \"%M %Y\") AND h_group_item='stagecoach' GROUP BY week ORDER BY week DESC";

?>
umber of hits per week. It gives the following results:

11/07/05 - 17/07/05 - 3410

04/07/05 - 10/07/05 - 5618

27/06/05 - 03/07/05 - 1966


What i want it to do is also count for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

<?php
$sql_dailycountP = "select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS end_of_week, DATE_FORMAT(h_date, \&q 
27/06/05 - 03/07/05  - 1966 


What i want it to do is also count for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

&lt;?php
$sql_dailycountP = &quote;select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \&quote;%d/%m/%y\&quote; ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \&quote;%d/%m/%y\&quote; ) AS end_of_week, DATE_FORMAT(h_date, \&quote;%u %M %Y\&quote;) AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_FORMAT(h_daults:

11/07/05 - 17/07/05  - 3410   
   
04/07/05 - 10/07/05  - 5618   
   
27/06/05 - 03/07/05  - 1966 


What i want it to do is also count for the days 27th - 3Oth June. At the moment for the date "27/06/05 - 03/07/05" it only counts between "01/07/05 - 03/07/05"

how can i do that?

heres my query:

Code: Select all

<?php
$sql_dailycountP = "select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS end_of_week, DATE_FORMAT(h_date, \"%u %M %Y\") AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_FORMAT(h_date, \"%M %Y\") = DATE_FORMAT(NOW(), \"%M %Y\") AND h_group_item='stagecoach' GROUP BY week ORDER BY week DESC";

?>
<?php
$sql_dailycountP = "select DATE_FORMAT(DATE_SUB(h_date, INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS start_of_week, DATE_FORMAT( DATE_SUB( DATE_ADD(h_date, INTERVAL 6 DAY ), INTERVAL WEEKDAY(h_date) DAY), \"%d/%m/%y\" ) AS end_of_week, DATE_FORMAT(h_date, \"%u %M %Y\") AS week, SUM(h_count) AS week_total,e.* FROM tbl_hitcounter e WHERE DATE_FORMAT(h_date, \"%M %Y\") = DATE_FORMAT(NOW(), \"%M %Y\") AND h_group_item='stagecoach' GROUP BY week ORDER BY week DESC";

?>

Posted: Fri Jul 15, 2005 7:36 am
by shiznatix
i would do somtin like this but there is probebly a better way

27th - 3Oth

Code: Select all

$start = '2005-06-27';
$end = '2005-06-30';

$query = '
    SELECT
        *
    FROM
        table_name
    WHERE
        start_date > "$start"
    AND
        end_date < "$end"
';
a better way

27th - 3Oth

Code: Select all

$start = '2005-06-27';
$end = '2005-06-30';

$query = '
    SELECT
        *
    FROM
        table_name
    WHERE
        start_date > "$start"
c1a3adb]
$start = '2005-06-27';
$end = '2005-06-30';

$query = '
    SELECT
        *
    FROM
        table_name
    WHERE
        start_date > "$start"
    AND
        end_date < "$end"
';
;

$query = '
SELECT
*
FROM
table_name
WHERE
start_date > "$start"
AND
end_date < "$end"
';

$end = '2005-06-30';

$query = '
SELECT
*
FROM
table_name
WHERE
start_date > "$start"
AND
end_date < "$end"
';
like this but there is probebly a better way

27th - 3Oth

Code: Select all

$start = '2005-06-27';
$end = '2005-06-30';

$query = '
    SELECT
        *
    FROM
        table_name
    WHERE
        start_date &gt; &quote;$start&quote;
    AND
        end_date &amplike this but there is probebly a better way

27th - 3Oth

Code: Select all

$start = '2005-06-27';
$end = '2005-06-30';

$query = '
    SELECT
        *
    FROM
        table_name
    WHERE
        start_date > "$start"
    AND
        end_date < "$end"
';
5c1a3adb]
$start = '2005-06-27';
$end = '2005-06-30';

$query = '
SELECT
*
FROM
table_name
WHERE
start_date > "$start"
AND
end_date < "$end"
';
05-06-27';
$end = '2005-06-30';

$query = '
SELECT
*
FROM
table_name
WHERE
start_date &gt; &quote;$start&quote;
AND
end_date &lt; &quote;$end&quote;
';
r way

27th - 3Oth

Code: Select all

$start = '2005-06-27';
$end = '2005-06-30';

$query = '
    SELECT
        *
    FROM
        table_name
    WHERE
        start_date > "$start"
    AND
        end_date < "$end"
';
e
WHERE
start_date > "$start"
AND
end_date < "$end"
';
b] there is probebly a better way

27th - 3Oth

Code: Select all

$start = '2005-06-27';
$end = '2005-06-30';

$query = '
    SELECT
        *
    FROM
        table_name
    WHERE
        start_date > "$start"
    AND
        end_date < "$end"
';
rt"
AND
end_date < "$end"
';

start_date > "$start"
AND
end_date < "$end"
';
end_date < "$end"
';
like this but there is probebly a better way

27th - 3Oth

Code: Select all

$start = '2005-06-27';
$end = '2005-06-30';

$query = '
    SELECT
        *
    FROM
        table_name
    WHERE
        start_date > "$start"
    AND
        end_date < "$end"
';
ly a better way

27th - 3Oth

Code: Select all

$start = '2005-06-27';
$end = '2005-06-30';

$query = '
    SELECT
        *
    FROM
        table_name
    WHERE
        start_date > "$start"
    AND
        end_date &amp
        table_name
    WHERE
        start_date > "$start"
    AND
        end_date < "$end"
';
ebly a better way

27th - 3Oth

Code: Select all

$start = '2005-06-27';
$end = '2005-06-30';

$query = '
    SELECT
        *
    FROM
        table_name
    WHERE
        start_date > "$start"
    AND
        end_date < "$end"
';
mp;amp;gt; "$start"
AND
end_date < "$end"
';
WHERE
start_date > "$start"
AND
end_date < "$end"
';
65c1a3adb]= '2005-06-27';
$end = '2005-06-30';

$query = '
SELECT
*
FROM
table_name
WHERE
start_date > "$start"
AND
end_date < "$end"
';
here is probebly a better way

27th - 3Oth

Code: Select all

$start = '2005-06-27';
$end = '2005-06-30';

$query = '
    SELECT
        *
    FROM
        table_name
    WHERE
        start_date > "$start"
    AND
        end_date < "$end"
';
like this but there is probebly a better way

27th - 3Oth

Code: Select all

$start = '2005-06-27';
$end = '2005-06-30';

$query = '
    SELECT
        *
    FROM
        table_name
    WHERE
        start_date > "$start"
    AND
       WHERE
        start_date > "$start"
    AND
        end_date < "$end"
';
th - 3Oth

Code: Select all

$start = '2005-06-27';
$end = '2005-06-30';

$query = '
    SELECT
        *
    FROM
        table_name
    WHERE
        start_date > "$start"
    AND
        end_date < "$end"
';
[/php   FROM
        table_name
    WHERE
        start_date &gt; &quote;$start&quote;
    AND
        end_date &lt; &quote;$end&quote;
';
like this but there is probebly a better way

27th - 3Oth

Code: Select all

$start = '2005-06-27';
$end = '2005-06-30';

$query = '
    SELECT
        *
    FROM
        table_name
    WHERE
        start_date > "$start"
    AND
        end_date < "$end&quo      table_name
    WHERE
        start_date > "$start"
    AND
        end_date < "$end"
';
SELECT
*
FROM
table_name
WHERE
start_date > "$start"
AND
end_date < "$end"
';

FROM
table_name
WHERE
start_date > "$start"
AND
end_date < "$end"
';
like this but there is probebly a better way

27th - 3Oth

Code: Select all

$start = '2005-06-27';
$end = '2005-06-30';

$query = '
    SELECT
        *
    FROM
        table_name
    WHERE
        start_date > "$start"
    AND
        end_date < "$end&quhp]
$start = '2005-06-27';
$end = '2005-06-30';

$query = '
    SELECT
        *
    FROM
        table_name
    WHERE
        start_date > "$start"
    AND
        end_date < "$end"
';
robebly a better way

27th - 3Oth

Code: Select all

$start = '2005-06-27';
$end = '2005-06-30';

$query = '
    SELECT
        *
    FROM
        table_name
    WHERE
        start_date > "$start"
    AND
        end_date < "$end"
';
*
FROM
table_name
WHERE
start_date > "$start"
AND
end_nd = '2005-06-30';

$query = '
SELECT
*
FROM
table_name
WHERE
start_date > "$start"
AND
end_date < "$end"
';
ly a better way

27th - 3Oth

Code: Select all

$start = '2005-06-27';
$end = '2005-06-30';

$query = '
    SELECT
        *
    FROM
        table_name
    WHERE
        start_date > "$start"
    AND
        end_date < "$end"
';
*
FROM
table_name
WHERE
start_date &gt; &quote;$start"
AND

$start = '2005-06-27';
$end = '2005-06-30';

$query = '
SELECT
*
FROM
table_name
WHERE
start_date > "$start"
AND
end_date < "$end"
';