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

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

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -