Changeset 431 for pro-violet-viettel/sourcecode
- Timestamp:
- Nov 7, 2014 4:18:00 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/core/MY_Model.php
r396 r431 47 47 { 48 48 $sql="SELECT COUNT(".$this->id_name.") as total FROM ".$this->table_name." WHERE ".$data['field']." = '".$data['value']."' LIMIT 1"; 49 if (!isset($this->db->query($sql)->row_array()['total'])) return false; 50 if ($this->db->query($sql)->row_array()['total']==1) 51 { 52 return true; 53 } 54 else 55 { 56 return false; 57 } 49 50 $result = $this->db->query($sql); 51 $aryResult = $result->row_array(); 52 if (!isset($aryResult['total'])) return false; 53 if ((int)$aryResult['total'] >= 1) return true; else return false; 58 54 } 59 55 }
Note: See TracChangeset
for help on using the changeset viewer.