note4

Sunday, November 18, 2018

2:51 PM
SAMPLE CONCATENATE PHPRUNNER AUTO NUMBER


$sql="select max(substr(id,9)) as ReqNo from request where substr(id,7,2)=month(now())";
$rs=CustomQuery($sql);
$data=db_fetch_array($rs);
$str=date("Ymd");
$str.=($data["ReqNo"]+1);
$values["id"]=="$str$str2".str_pad($str3, 5, 0, STR_PAD_LEFT);


SAMPLE TABLE



select
id,
EmpReq,
DateReq,
CONCAT("REQ-", id) AS ReqNo,
Status
FROM request

STRUCTURE DB




0 comments: