RedBeanPHP\Facade::exec PHP Method

exec() public static method

Executes SQL.
public static exec ( string $sql, array $bindings = [] ) : integer
$sql string SQL query to execute
$bindings array a list of values to be bound to query parameters
return integer
    public static function exec($sql, $bindings = array())
    {
        return self::query('exec', $sql, $bindings);
    }

Usage Example

 public function logout()
 {
     $adminId = $this->app->getSession()->get('adminId');
     $sql = "delete from `adminsession` where `admin_id` = '" . $adminId . "'";
     R::exec($sql);
     $this->app->getSession()->remove('adminId');
 }
All Usage Examples Of RedBeanPHP\Facade::exec