classes.other/PSM.php
/* This function is meant to take in data and check if the table data exists, if so do the function given in the array, if not then do the function in array if given.
      A more vigarous version of the "hasdata()" function.*/
This function is meant to take in data and check if the table data exists, if so do the function given in the array, if not then do the function in array if given.
A more vigarous version of the "hasdata()" function.
This function is meant to take in data and check if the table data exists if so do the function given in the array if not then do the function in array if given . A more vigarous version of the " hasdata () " function .
public function hasdata_specific($table, $column, $columnequals, $callers = false)
          {
            $statement = "SELECT {$column} FROM {$table} WHERE {$column} = ?";
            $binds     = [$columnequals];
            if ($callers == false)
              if ($this->rows( $statement, $binds )) return true;
              else return false;
            else
              if ($this->rows( $statement, $binds ))
                call_user_func( $callers['true'], $this );
              else
                call_user_func( $callers['false'], $this );
          }
public function hasdata_specific ( $ table , $ column , $ columnequals , $ callers = false ) { $ statement = " SELECT  { $ column }  FROM  { $ table }  WHERE  { $ column }  = ? " ; $ binds = [ $ columnequals ] ; if ( $ callers == false ) if ( $ this -> rows ( $ statement , $ binds ) ) return true ; else return false ; else if ( $ this -> rows ( $ statement , $ binds ) ) call_user_func ( $ callers [ 'true' ] , $ this ) ; else call_user_func ( $ callers [ 'false' ] , $ this ) ; }
This function is meant to take in data and check if the table data exists, if so do the function given in the array, if not then do the function in array if given.
This function is meant to take in data and check if the table data exists if so do the function given in the array if not then do the function in array if given .
// Will construct statement: SELECT column FROM table WHERE column = :columndata // Return. // No array supplied for callbacks. // Array supplied for callbacks.