src/Origins/BaseModel.php
protected static function selectAll($model, $tableName)
    {   
        $connection = Connection::connect();

        $getAll = $connection->prepare('select * from '.$tableName);
        $getAll->execute();

        while ($allRows = $getAll->fetch(PDO::FETCH_ASSOC)) {
            array_push($model->resultRows, $allRows);
        }

        return $model;
    }
protected static function selectAll($model, $tableName)
    {   
        $connection = Connection::connect();

        $getAll = $connection->prepare('select * from '.$tableName);
        $getAll->execute();

        while ($allRows = $getAll->fetch(PDO::FETCH_ASSOC)) {
            array_push($model->resultRows, $allRows);
        }

        return $model;
    }
protected static function selectAll ( $ model , $ tableName ) { $ connection = Connection :: connect ( ) ; $ getAll = $ connection -> prepare ( 'select * from ' . $ tableName ) ; $ getAll -> execute ( ) ; while ( $ allRows = $ getAll -> fetch ( PDO :: FETCH_ASSOC ) ) { array_push ( $ model -> resultRows , $ allRows ) ; } return $ model ; }
Search database for all rows

@param $model
@param $tableName
@return mixed
Search database for all rows