Help with SQL commands to interact with a MySQL database
- Mac /usr/local/mysql/bin
- Windows /Program Files/MySQL/MySQL version/bin
- Xampp /xampp/mysql/bin
// phone numbers | |
var numbers = ['01988123456','+8801988123456','8801988123456','01788123456','+8801788123456','8801788123456','01688123456','+8801688123456','8801688123456','01388123456','+8801388123456','8801588123456','01588123456','8801888123456','01888123456']; | |
function validate_bdnumber(number) | |
{ | |
pattern = /^\+?(88)?0(19|14|17|13|18|16|15)\d{8}$/ | |
return number.match(pattern) ? true : false; | |
} |
#!/usr/bin/env bash | |
sudo apt-get update && apt-get upgrade | |
sudo apt-get install software-properties-common | |
sudo add-apt-repository ppa:ondrej/php | |
sudo apt-get update | |
sudo apt install \ | |
php7.0 \ | |
php7.0-bcmath \ |
<?php | |
$file_name = $_GET['lock_file'] ?? rand(); | |
$status_file = $file_name.'.lock'; | |
$file_name = $file_name.'.csv'; | |
$line = 0; | |
while( $line < 5 ){ |
<?php | |
$lock_file = $_GET['lock_file']; | |
$data = file_get_contents($lock_file); | |
$data = unserialize($data); | |
echo json_encode($data); |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Testing ajax loader</title> | |
</head> | |
<body> | |
<div id="progress">0</div> |
switch ($ind_code) { | |
case '001': | |
$query = $con->select('SELECT count(distinct(branch_id)) as data FROM `monthlySavingSummary` where report_date between ? and ?',$date_between); | |
break; | |
case '002': | |
$query = $con->select('SELECT sum(male_samity) as data FROM `monthlySavingSummary` where row_type = 1 and report_date between ? and ?',$date_between); | |
break; |
$data = DB::connection('mysql')->select("Select '007' as po_code,'01' as company_code,'HO' as company_branch_code | |
,'01' as finance_code,'01' as project_code,'001' as component_code | |
,'01/2023' as mnyr,'CORE' as coa_id,l1_code,l2_code,l3_code,l4_code,l5_code | |
,0 as acctype,accgroup,SUM(Case WHen t.acc_group=4 Then cur_credit-cur_debit When t.acc_group Not In(2,4) Then cur_credit Else 0 End) as this_month_cash | |
,SUM(Case WHen t.acc_group=4 Then Op_credit-Op_debit+cur_credit-cur_debit WHen t.acc_group Not In(2,4) Then op_credit+cur_credit Else 0 End) as this_fy_cash | |
,SUM(Case WHen t.acc_group=4 Then jr_credit-jr_debit When t.acc_group Not In(2,4) Then jr_credit Else 0 End) as this_month_noncash | |
,SUM(Case WHen t.acc_group=4 Then previouse_journal_credit-previouse_journal_debit+jr_credit-jr_debit WHen t.acc_group Not In(2,4) Then previouse_journal_credit+jr_credit Else 0 End) as this_fy_noncash | |
,0 as last_june | |
,0 as bal_dr,0 as bal_cr,0 as cum_bal_cr | |
,0 as cum_bal_dr |
$data = DB::connection('mysql')->select("Select '007' as po_code,'01' as company_code,'HO' as company_branch_code | |
,'01' as finance_code,'01' as project_code,'001' as component_code | |
,'01/2023' as mnyr,'CORE' as coa_id,l1_code,l2_code,l3_code,l4_code,l5_code | |
,0 as acctype,accgroup,SUM(Case WHen t.acc_group=4 Then cur_credit-cur_debit When t.acc_group Not In(2,4) Then cur_credit Else 0 End) as this_month_cash | |
,SUM(Case WHen t.acc_group=4 Then Op_credit-Op_debit+cur_credit-cur_debit WHen t.acc_group Not In(2,4) Then op_credit+cur_credit Else 0 End) as this_fy_cash | |
,0 as this_month_noncash,0 as last_june | |
,0 as bal_dr,0 as bal_cr,0 as cum_bal_cr | |
,0 as cum_bal_dr | |
From olrs_trailbalance t Inner Join (select distinct acc_chart,olrs_acc_chart from acc_map) a ON t.acc_id=a.acc_chart | |
Inner Join po_a_acc_head pa ON a.olrs_acc_chart=pa.Id |
========================== | |
How Software Companies Die | |
========================== | |
- Orson Scott Card | |
The environment that nurtures creative programmers kills management and | |
marketing types - and vice versa. | |
Programming is the Great Game. It consumes you, body and soul. When | |
you're caught up in it, nothing else matters. When you emerge into |