Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
addiks committed Nov 14, 2016
1 parent 8cf2880 commit af79ff5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Addiks/PHPSQL/PDO/Statement.php
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ public function fetchAll($fetchStyle = \PDO::FETCH_BOTH)
public function fetchColumn($columnIndex = 0)
{

$row = $this->fetch(Code::FETCH_NUM);
$row = $this->fetch(\PDO::FETCH_NUM);

return $row[(int)$columnIndex];
}
Expand Down
5 changes: 5 additions & 0 deletions src/Addiks/PHPSQL/Table/TableManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
use Addiks\PHPSQL\Table\TableFactoryInterface;
use Addiks\PHPSQL\Column\ColumnDataFactoryInterface;
use Addiks\PHPSQL\Index\IndexFactory;
use InvalidArgumentException;

class TableManager
{
Expand Down Expand Up @@ -73,6 +74,10 @@ public function getTable($tableName, $schemaId = null)

$tableIndex = $databaseSchema->getTableIndex($tableName);

if (is_null($tableIndex)) {
throw new InvalidArgumentException("Table '{$tableName}' does not exist!");
}

/* @var $databaseSchemaPage DatabaseSchemaPage */
$databaseSchemaPage = $databaseSchema->getTablePage($tableIndex, $schemaId);

Expand Down

0 comments on commit af79ff5

Please sign in to comment.