Changeset 20052 for trunk/FACT++/www/schedule/save.php
- Timestamp:
- 03/24/21 22:28:33 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/www/schedule/save.php
r18797 r20052 134 134 // ================================================================ 135 135 136 $db = mysql_connect($dbhost,$dbuser,$dbpass);137 if ( !$db)138 die( mysql_error());139 140 if (! mysql_select_db($dbname, $db))141 die( mysql_error());136 $db = new mysqli($dbhost,$dbuser,$dbpass); 137 if ($db->connect_error) 138 die($db->connect_error); 139 140 if (!$db->select_db($dbname)) 141 die($db->error); 142 142 143 143 $query = "SELECT * FROM MeasurementType"; 144 144 145 $sql = mysql_query($query);145 $sql = $db->query($query); 146 146 if (!$sql) 147 die( mysql_error());147 die($db->error); 148 148 149 149 $measurements = array(); 150 while($row = mysql_fetch_assoc($sql))150 while($row = $db->fetch_assoc($sql)) 151 151 $measurements[$row['fMeasurementTypeKey']] = $row; 152 152 … … 271 271 272 272 foreach ($queries as $query) 273 if (! mysql_query($query))274 die( mysql_error());275 276 mysql_close($db);273 if (!$db->query($query)) 274 die($sql->error); 275 276 $db->close(); 277 277 278 278 ?>
Note:
See TracChangeset
for help on using the changeset viewer.