Changeset 29 for trunk/Run.php
- Timestamp:
- Sep 17, 2019, 10:58:51 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Run.php
r3 r29 8 8 var $ChipNumber; 9 9 10 function AddIfNotExist( )10 function AddIfNotExist($ReturnQuery = false) 11 11 { 12 12 $DbResult = $this->Database->select('Runner', '*', … … 14 14 if ($DbResult->num_rows == 0) 15 15 { 16 $ this->Database->insert('Runner', array(16 $Result = $this->Database->GetInsert('Runner', array( 17 17 'Name' => $this->Name, 18 18 'Gender' => $this->Gender, … … 20 20 'ChipNumber' => $this->ChipNumber, 21 21 )); 22 $Result = 1;23 22 $this->Id = $this->Database->insert_id; 24 23 } else { 25 $Result = 0;26 24 $DbRow = $DbResult->fetch_assoc(); 27 25 $this->Id = $DbRow['Id'];
Note:
See TracChangeset
for help on using the changeset viewer.