kopia lustrzana https://github.com/magicbug/Cloudlog
Contest: Fixed Serial number Bug where extra 0 are shown
rodzic
126ab6b1eb
commit
17d7834455
|
@ -11,7 +11,7 @@ class Contests extends CI_Model {
|
|||
function information($id) {
|
||||
$this->db->select('*');
|
||||
$this->db->from('contests');
|
||||
//$this->db->where('id', $id);
|
||||
$this->db->where('contests.template', $id);
|
||||
$this->db->join('contest_template', 'contest_template.id = contests.template');
|
||||
$query = $this->db->get();
|
||||
return $query->row();
|
||||
|
@ -116,6 +116,7 @@ class Contests extends CI_Model {
|
|||
}
|
||||
//$this->db->order_by("COL_PRIMARY_KEY", "asc");
|
||||
$this->db->order_by("COL_TIME_ON", "desc");
|
||||
//$this->db->order_by("COL_STX_STRING", "ASC");
|
||||
$this->db->limit(10);
|
||||
|
||||
return $this->db->get($this->config->item('table_name'));
|
||||
|
|
|
@ -22,11 +22,11 @@
|
|||
|
||||
<?php
|
||||
$serial_number = $info->serial_num + 1;
|
||||
if($serial_number <= 49) {
|
||||
if($serial_number <= 009) {
|
||||
$new_serial = "00".$serial_number;
|
||||
}
|
||||
|
||||
if($serial_number >= 49 && $serial_number <= 100) {
|
||||
if($serial_number >= 010 && $serial_number <= 100) {
|
||||
$new_serial = "0".$serial_number;
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue