Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Commit

Permalink
If table isn't found, throw a warning, and return false.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelchisari authored and The Appleseed Project committed Dec 9, 2010
1 parent eb4d916 commit ad69a48
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions system/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,18 @@ public function Query ( $pQuery ) {
}

public function GetFieldInformation ( $pTablename ) {
eval ( GLOBALS );

$prefix = $this->GetSys ( "Config" )->GetConfiguration ( "pre" );

$table = $prefix . $pTablename;

if ( !$result = $this->_DB->query ( "DESC $table" ) ) {

echo __( "Table Does Not Exist", array ( "name" => $table ) );
exit;
$warning = __( "Table Does Not Exist", array ( "name" => $table ) );
$zApp->GetSys ( "Logs" )->Add ( $warning, "Warnings" );

return ( false );
}

$fieldinfo = $result->fetchAll ( PDO::FETCH_ASSOC );
Expand Down

0 comments on commit ad69a48

Please sign in to comment.