This commit is contained in:
rsgrinko committed 2021-04-28 23:16:29 +03:00
1 parent 7b97a5631d
commit e261a78f06
1 file changed
+13 -7
+13 -7
View File
@@ -9,10 +9,10 @@ echo '<pre>'.print_r($result, true).'</pre>';
// Update
$result = $DataBase->update('iot_sensors',
array(
array( //WHERE ID=3924538
'ID' => '3924538'
),
array(
array( //SET VALUE=601, SENSOR=test_sensor2
'VALUE' => '601',
'SENSOR' => 'test_sensor2'
)
@@ -20,16 +20,22 @@ $result = $DataBase->update('iot_sensors',
echo '<pre>'.print_r($result, true).'</pre>';
// Get items (sort ORDER BY VALUE DESC)
$result = $DataBase->getItems('iot_sensors', array('VALUE'=>'>32'), array('VALUE'=>'DESC'));
// Get items
$result = $DataBase->getItems('iot_sensors',
array(
'VALUE'=>'>32' // WHERE VALUE>32
),
array(
'VALUE'=>'DESC' // ORDER BY VALUE DESC
));
echo '<pre>'.print_r($result, true).'</pre>';
// users class
$User->Authorize(1);
$User->Authorize(1); //set cookies
$result = $User->getFields(1);
$result = $User->getFields(1); //Get fields for user id=1
echo '<pre>'.print_r($result, true).'</pre>';
$User->Logout();
$User->Logout(); //remove cookies