classes.other/PSM.php
/* Deletes all the ids that are given to it in the table given. */
Deletes all the ids that are given to it in the table given.
Deletes all the ids that are given to it in the table given .
public function delete($table, $col = false, $selectors = false)
          {
            if ($col === false)
              {
                $this->cquery("DROP TABLE {$table}");
              }
            else
              {
                $statement = "DELETE FROM {$table} WHERE {$col} IN (";
                $a_selectors = [];
                foreach ($selectors as $selector) array_push($a_selectors, '?');
                $statement .= implode(',', $a_selectors);
                $statement .= ')';
                $binds = $selectors;
                $this->cquery( $statement, $binds );
              }
          }
public function delete ( $ table , $ col = false , $ selectors = false ) { if ( $ col === false ) { $ this -> cquery ( " DROP TABLE  { $ table } " ) ; } else { $ statement = " DELETE FROM  { $ table }  WHERE  { $ col }  IN ( " ; $ a_selectors = [ ] ; foreach ( $ selectors as $ selector ) array_push ( $ a_selectors , '?' ) ; $ statement .= implode ( ',' , $ a_selectors ) ; $ statement .= ')' ; $ binds = $ selectors ; $ this -> cquery ( $ statement , $ binds ) ; } }
Deletes all the ids that are given to it in the table given.
Deletes all the ids that are given to it in the table given .
// Delete table. // Delete what the user asks for. /*
                | Essentially, COL = the column to look for, and SELECTORS = the data to look for.
                | Example: col = id, selectors = [1, 2, 3], DELETE FROM table WHERE id = 1,2,3
                */ // Execute.