Commit 879045ac authored by Benjamin Eberlei's avatar Benjamin Eberlei

Merge pull request #33 from lucassouza1/patch-1

Filter table columns by owner
parents 8e8ef8ca 0a73cb53
......@@ -475,9 +475,16 @@ LEFT JOIN all_cons_columns r_cols
public function getListTableColumnsSQL($table, $database = null)
{
$table = strtoupper($table);
$ownerCondition = '';
if(null !== $database){
$database = strtoupper($database);
$ownerCondition = "AND c.owner = '".$database."'";
}
return "SELECT c.*, d.comments FROM all_tab_columns c ".
"INNER JOIN all_col_comments d ON d.OWNER = c.OWNER AND d.TABLE_NAME = c.TABLE_NAME AND d.COLUMN_NAME = c.COLUMN_NAME ".
"WHERE c.table_name = '" . $table . "' ORDER BY c.column_name";
"WHERE c.table_name = '" . $table . "' ".$ownerCondition." ORDER BY c.column_name";
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment