Posts

all customer due sql query

  SELECT DONORID,DONORNAME,INROLLEDDATE,addresss AS DONORADDRESS, donor_mobile AS DONORMOBILE, INROLLEDMONTH,PAYABLEAMOUNT,paid_amount AS TOTALPAID, (CASE WHEN (PAYABLEAMOUNT-paid_amount)>0 THEN (PAYABLEAMOUNT-paid_amount) ELSE 0 END) AS TOTALDUEAMOUNT, (CASE WHEN (PAYABLEAMOUNT-paid_amount)<0 THEN ABS((PAYABLEAMOUNT-paid_amount)) ELSE 0 END) AS TOTALADVANCE FROM  ( SELECT c.id AS DONORID, CONVERT(YEAR(CONVERT(c.insert_date, DATE)),BINARY) AS INROLLEDYEAR, MONTH(CONVERT(c.insert_date, DATE)) AS MonthNo, MONTHNAME(CONVERT(c.insert_date, DATE)) AS MONTHNAME, CONVERT(c.insert_date, DATE) AS INROLLEDDATE, CURDATE(), FLOOR(DATEDIFF(CURDATE(),CONVERT(c.insert_date, DATE))/30) AS INROLLEDMONTH, FLOOR(DATEDIFF(CURDATE(),CONVERT(c.insert_date, DATE))/30)*c.donor_amount AS PAYABLEAMOUNT, c.donor_name AS DONORNAME, c.addresss,c.donor_district,c.donor_thana,c.donor_mobile,c.donor_type,     c.donor_amount,c.donor_rosid, (CASE WHEN dp.totalPaid >

id wise total due sql query

   SELECT DONORID,DONORNAME,INROLLEDDATE,addresss AS DONORADDRESS, donor_mobile AS DONORMOBILE, INROLLEDMONTH,PAYABLEAMOUNT,paid_amount AS TOTALPAID, (CASE WHEN (PAYABLEAMOUNT-paid_amount)>0 THEN (PAYABLEAMOUNT-paid_amount) ELSE 0 END) AS TOTALDUEAMOUNT, (CASE WHEN (PAYABLEAMOUNT-paid_amount)<0 THEN ABS((PAYABLEAMOUNT-paid_amount)) ELSE 0 END) AS TOTALADVANCE FROM  ( SELECT c.id AS DONORID, CONVERT(YEAR(CONVERT(c.insert_date, DATE)),BINARY) AS INROLLEDYEAR, MONTH(CONVERT(c.insert_date, DATE)) AS MonthNo, MONTHNAME(CONVERT(c.insert_date, DATE)) AS MONTHNAME, CONVERT(c.insert_date, DATE) AS INROLLEDDATE, CURDATE(), FLOOR(DATEDIFF(CURDATE(),CONVERT(c.insert_date, DATE))/30) AS INROLLEDMONTH, FLOOR(DATEDIFF(CURDATE(),CONVERT(c.insert_date, DATE))/30)*c.donor_amount AS PAYABLEAMOUNT, c.donor_name AS DONORNAME, c.addresss,c.donor_district,c.donor_thana,c.donor_mobile,c.donor_type,     c.donor_amount,c.donor_rosid, (CASE WHEN dp.totalPaid &g

send email

 https://www.youtube.com/watch?v=FZfneLNyE4o     function do_email ( $msg = NULL , $sub = NULL , $to = NULL , $attachment = NULL ) {         $config = array ();         $config [ 'protocol' ] = "smtp" ;         $config [ 'smtp_host' ] = "ssl://smtp.googlemail.com" ;         $config [ 'smtp_port' ] = "465" ;         $config [ 'smtp_user' ] = "marinersbloodcenter@gmail.com" ;         $config [ 'smtp_pass' ] = "gyhqdnegnqfcqtvu" ;         $config [ 'mailtype' ] = "html" ;         $config [ 'charset' ] = "utf-8" ;         $config [ 'newline' ] = " \r\n " ;         $config [ 'wordwrap' ] = TRUE ;         $this -> load -> library ( 'email' );         $this -> email -> initialize ( $config );         $system_name = $this -> db -> get_where ( 'settings' , array ( 'type' => 'system_name

ajax-pagination-in-codeigniter

 https://webdamn.com/ajax-pagination-in-codeigniter-with-example/

sms intregation by laravel

  protected function createCustomer(Request $request)     {         $frontDesign=Websitefrontdesign::first();   if($request->password != $request->re_password) { return redirect()->route('register')->with('error_message', 'Password Not Matched,Please Try Again.'); } if($request->customer_email != null) { $customer_email=$request->customer_email;     $checkIfCutomerEmailExist=Customer::where('customer_email',$request->customer_email)->first();     if($checkIfCutomerEmailExist != null)     {     return redirect()->route('register')->with('error_message', 'Email Already Exist Please,Give Differnt Email Address.');     } } else { $customer_email=""; } $checkIfCutomerUserNameExist=Customer::where('customer_username',$request->customer_username)->first();       if($checkIfCutomerUserNameExist !=

get data by codeiginter

      $this -> data [ 'department' ] = $this -> db -> query ( " SELECT * FROM blog " ) -> result ();

date wise search codeigniter

  if ( ! empty ( $startdate ))         {             $this -> db -> where ( 'DATE(pickupman_received_date) >=' , $startdate );             }         if ( ! empty ( $enddate ))         {                   $this -> db -> where ( 'DATE(pickupman_received_date) <=' , $enddate );               }