how to write a query ? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: how to write a query ? (/showthread.php?tid=72127) |
how to write a query ? - kvanaraj - 11-09-2018 Code: My table look like Code: Date Sesson work Amount Code: SELECT DATE_FORMAT(`time_stamp`,'%d-%m-%Y') as time_stamp, RE: how to write a query ? - InsiteFX - 11-09-2018 order by date RE: how to write a query ? - php_rocs - 11-09-2018 @kvanaraj, Have you resolved this or are you still having an issue with it? RE: how to write a query ? - kvanaraj - 11-12-2018 (11-09-2018, 07:11 AM)php_rocs Wrote: @kvanaraj, I am not asking order by date, grouping of date with amount . just check attached image RE: how to write a query ? - Wouter60 - 11-14-2018 First, if your table field is called "wdate", why do you try to write a query that uses the field "time_stamp"? Second, you need a value called "Amount" in your output. Where is it in your database? RE: how to write a query ? - kvanaraj - 11-14-2018 (11-14-2018, 12:08 PM)Wouter60 Wrote: First, if your table field is called "wdate", why do you try to write a query that uses the field "time_stamp"?1,column name changed, 2, the amount should calculated based on the count ( for ex if count(an,fn)=1, amount 300,else 350) |