php - Yii2: how to use mysql LEFT() function along with time stamp in Yii2 -


i need create client id page in client id should made of first 4 letters of company name + current time stamp in it.

e.g sams1016 (samsung= sams + time(10:16)=1016)

also, need auto generate, when user enter client information in form, enter company name , other details client id field should hidden. when user submits form, should take company name company_name field , generate client id time stamp.

how achieve this?

you looking somethings :

select concat( left('your_company',4) , date_format(now(), '%h%m ') ) your_table; 

Comments

Popular posts from this blog

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

javascript - Using jquery append to add option values into a select element not working -

javascript - Restarting Supervisor and effect on FlaskSocketIO -