declare @f_date1 as date='2016-11-01' declare @groups as varchar(4)='1401' SELECT acc_code,open_dr as dr_amount,open_cr as cr_amount from master where acc_code like @groups+'%'it work fine, but when i use with php query like this
$groups='1401'; $t_date1=date('Y-m-d'); SELECT acc_code,dr_amount,cr_amount from vouchers where date <= '".$t_date1 ."' and LEN(acc_code)>4 and acc_code like '".$groups."+%then it says: