<commit_before><?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Cron extends CI_Controller {

	public function monthly_limit_reminder(){

		$servername = "localhost";
		  $username = "root";
		  $password = "";
		  $dbname = "jewelery";

		  $connection = mysqli_connect(
		                $servername,
		                $username,
		                $password,
		                $dbname
		                );

		    if(!$connection){
		    die("connection failed : ".mysqli_conect_error());
		  }

		$this_month = date('F');

		$date = date('Y-m');

		$all_transaction = mysqli_query($connection,"SELECT SUM(amount) AS Total FROM transactions WHERE month = '$this_month'");

		$monthly_limit = mysqli_query($connection,"SELECT *
                        FROM monthly_limit WHERE month = '$this_month' ");

		$transactions = mysqli_query($connection, "SELECT installments.*,transactions.description,transactions.created,transactions.spanning_month, transactions.amount AS total_amount FROM installments INNER JOIN transactions
			ON installments.transaction_id=transactions.id WHERE installments.due LIKE '%'");
		echo"<pre>";

		while($month = mysqli_fetch_array($transactions,MYSQLI_ASSOC)){

			print_r($month);

			echo date('d',strtotime($month['due']));
		};

		while($row = mysqli_fetch_array($all_transaction,MYSQLI_ASSOC)){
			print_r($row);
		}

		echo "</pre>";

		// $total_transactions = mysql_query("SELECT SUM(weight)".
		// 				"FROM transactions".
		// 				"WHERE month = date('F') AND type = 'gold' ");<commit_msg>nyelip<commit_after><?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Cron extends CI_Controller {

	public function monthly_limit_reminder(){

		$servername = "localhost";
		  $username = "root";
		  $password = "";
		  $dbname = "jewelery";

		  $connection = mysqli_connect(
		                $servername,
		                $username,
		                $password,
		                $dbname
		                );

		    if(!$connection){
		    die("connection failed : ".mysqli_conect_error());
		  }

		$this_month = date('F');

		$date = date('Y-m');

		$all_transaction = mysqli_query($connection,"SELECT SUM(amount) AS Total FROM transactions WHERE month = '$this_month'");

		$monthly_limit = mysqli_query($connection,"SELECT *
                        FROM monthly_limit WHERE month = '$this_month' ");

		$transactions = mysqli_query($connection, "SELECT installments.*,transactions.description,transactions.created,transactions.spanning_month, transactions.amount AS total_amount FROM installments INNER JOIN transactions
			ON installments.transaction_id=transactions.id WHERE installments.due LIKE '%'");
		echo"<pre>";

		while($month = mysqli_fetch_array($transactions,MYSQLI_ASSOC)){

			print_r($month);

			echo date('Y-m-d',strtotime($month['due'] ." + 1 day")) ;
		};

		while($row = mysqli_fetch_array($all_transaction,MYSQLI_ASSOC)){
			print_r($row);
		}

		echo "</pre>";

		// $total_transactions = mysql_query("SELECT SUM(weight)".
		// 				"FROM transactions".
		// 				"WHERE month = date('F') AND type = 'gold' ");
{'fraction_non_alphanumeric': 0.14084507042253522, 'fraction_numerical': 0.0003201024327784891, 'mean_word_length': 3.3584379358437935, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6179024', 'n_tokens_mistral': 1083, 'n_tokens_neox': 913, 'n_words': 186}