Thursday, 1 November 2018

how to run loop with php mysql display results according to months with total of columns value

I am trying to get output as below image:

enter image description here

Below is my table structure and entries:

enter image description here

I have tried with below query:

$from_date = '2018-04-01';  
$to_date = '2018-09-2018';  

$cid = mysqli_query($con_db,"SELECT * FROM tbl_silver_stock WHERE stockdate between '$from_date' and '$to_date'");

I am having issue with how to check month is complete and get the total values of columns.

Please help me.



from how to run loop with php mysql display results according to months with total of columns value

No comments:

Post a Comment