classes.other/PSM.php
/* Will go into the table and find the column, and find the ID of given ID, and increase it by how it wants. */
Will go into the table and find the column, and find the ID of given ID, and increase it by how it wants.
Will go into the table and find the column and find the ID of given ID and increase it by how it wants .
public function plus($table, $selector_array)
          {
            $col = $selector_array['col'];
            $id  = $selector_array['id'];
            if (isset($selector_array['by'])) $by = $selector_array['by']; else $by = 1;
            $set = $this->cquery("SELECT {$col} FROM {$table} WHERE id = :id ORDER BY id DESC LIMIT 1", [
              ':id' => $id
            ])->fetch();
            $this->update($table, [
              "{$col}" => $set[$col] + $by
            ], "id = {$id}", true);
          }
public function plus ( $ table , $ selector_array ) { $ col = $ selector_array [ 'col' ] ; $ id = $ selector_array [ 'id' ] ; if ( isset ( $ selector_array [ 'by' ] ) ) $ by = $ selector_array [ 'by' ] ; else $ by = 1 ; $ set = $ this -> cquery ( " SELECT  { $ col }  FROM  { $ table }  WHERE id = :id ORDER BY id DESC LIMIT 1 " , [ ':id' => $ id ] ) -> fetch ( ) ; $ this -> update ( $ table , [ " { $ col } " => $ set [ $ col ] + $ by ] , " id =  { $ id } " , true ) ; }
Will go into the table and find the column, and find the ID of given ID, and increase it by how it wants.
Will go into the table and find the column and find the ID of given ID and increase it by how it wants .
// Set. // Retrieval. // Update.