Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.
how i can calculate unit_qty for morning (from 0 to 6) then daily from 7pm to 19:59 then night from 20 to 23:59pm
$result=mysql_query( "SELECT a.hr, SUM(case when b.pulse_channel = 1 then b.unit_qty else 0 end) as name1, SUM(case when b.pulse_channel = 2 then b.unit_qty else 0 end) as name2, SUM(case when b.pulse_channel = 3 then b.unit_qty else 0 end) as name3, SUM(case when b.pulse_channel = 4 then b.unit_qty else 0 end) as name4, SUM(b.unit_qty) as Total from ( select 0 as hr union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9 union select 10 union select 11 union select 12 union select 13 union select 14 union select 15 union select 16 union select 17 union select 18 union select 19 union select 20 union select 21 union select 22 union select 23) a left join count_transactions b on a.hr = Hour(b.tran_date) WHERE DATE(b.tran_date) BETWEEN '$dateb' AND '$dateb' AND unit_serial=$netw GROUP BY a.hr" ) or die("SELECT Error: ".mysql_error());
|pasword_hash updating database even with empty form value||5||37|
|How to Migrate from SQL to MYSQL in .net Web Application||2||42|
|Saving position of jquery sortable portlet to database||11||49|
|User with DBO permission can't remotely connect||15||38|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
13 Experts available now in Live!