i have problem to make auto number format for 20130507001 (Ymd sort number) and sort number restart to 001 every day if different date
my script already now i have (thanks to Aandy)
switch ($mode) {
case'add':
$rbo = new RBO_RecordsetAccessor('premium_project');
$records = $rbo->get_records(array('"~ref_project => DB::Concat(date('Ymd'), DB::qstr('%'))));
$count = $rbo->get_records_count() + 1;
$default = date('Ymd') . sprintf("%03d", $count);
break;
1. above script is auto number but not restart to 001 every day and still continue for that date, if i add new first record on 8 May its still 20130507002 i want it show 20130508001
2. i have a date_project field to, so i want when i change date project on form, the date is follow it change and get last record for that day.
3. i want make queing number by get the three digit from above number example 20130508001, so iwant get the three digit as queing number and show on record browser and applet, can i ?
hope get solution from here.. :wink: thanks