$sql_id = "SELECT * FROM from order ORDER BY order_id desc limit 1";
$result_id = mysql_db_query($dbname,$sql_id);
$nums=substr($result_id[order_id],2,3)+1;
$lenght=3-strlen($nums);
switch ($lenght){
case 0: $nums="จ.".$nums; break;
case 1: $nums="จ.0".$nums; break;
case 2: $nums="จ.00".$nums; break;
}