More heredoc conversion

This commit is contained in:
Timothy Warren 2012-02-13 14:16:29 -05:00
parent 043f88691c
commit 1a4770dec2
3 changed files with 25 additions and 16 deletions

View File

@ -17,7 +17,6 @@ Follow the CodeIgniter [Style Guide](https://github.com/timw4mail/CodeIgniter/bl
## Database reference material ## Database reference material
### Firebird ### Firebird
* [Interbase 6 Lang Ref](http://fbclient.googlecode.com/files/LangRef.pdf) - SQL Syntax (pdf) * [Interbase 6 Lang Ref](http://fbclient.googlecode.com/files/LangRef.pdf) - SQL Syntax (pdf)
* [Firebird Lang Update Ref](http://www.firebirdsql.org/file/documentation/reference_manuals/reference_material/html/langrefupd25.html) - SQL Syntax Updates * [Firebird Lang Update Ref](http://www.firebirdsql.org/file/documentation/reference_manuals/reference_material/html/langrefupd25.html) - SQL Syntax Updates
@ -30,6 +29,5 @@ Follow the CodeIgniter [Style Guide](https://github.com/timw4mail/CodeIgniter/bl
* [Performance Tips](http://www.postgresql.org/docs/9.0/interactive/performance-tips.html) * [Performance Tips](http://www.postgresql.org/docs/9.0/interactive/performance-tips.html)
### SQLite ### SQLite
* [SQL Syntax](http://www.sqlite.org/lang.html) * [SQL Syntax](http://www.sqlite.org/lang.html)
* [Pragma SQL Syntax](http://www.sqlite.org/pragma.html) - Internal / Performance Stuff * [Pragma SQL Syntax](http://www.sqlite.org/pragma.html) - Internal / Performance Stuff

View File

@ -136,9 +136,12 @@ class firebird {
*/ */
function get_tables() function get_tables()
{ {
$sql='SELECT "RDB$RELATION_NAME" FROM "RDB$RELATIONS" $sql = <<<SQL
WHERE "RDB$RELATION_NAME" NOT LIKE \'RDB$%\' SELECT "RDB$RELATION_NAME" FROM "RDB$RELATIONS"
AND "RDB$RELATION_NAME" NOT LIKE \'MON$%\''; WHERE "RDB$RELATION_NAME" NOT LIKE 'RDB$%'
AND "RDB$RELATION_NAME" NOT LIKE 'MON$%'
SQL;
$this->statement = $this->query($sql); $this->statement = $this->query($sql);
$tables = array(); $tables = array();
@ -158,9 +161,11 @@ class firebird {
*/ */
function get_system_tables() function get_system_tables()
{ {
$sql='SELECT "RDB$RELATION_NAME" FROM "RDB$RELATIONS" $sql = <<<SQL
WHERE "RDB$RELATION_NAME" LIKE \'RDB$%\' SELECT "RDB$RELATION_NAME" FROM "RDB$RELATIONS"
OR "RDB$RELATION_NAME" LIKE \'MON$%\''; WHERE "RDB$RELATION_NAME" LIKE 'RDB$%'
OR "RDB$RELATION_NAME" LIKE 'MON$%';
SQL;
$this->statement = $this->query($sql); $this->statement = $this->query($sql);

View File

@ -74,9 +74,11 @@ SQL;
*/ */
function get_tables() function get_tables()
{ {
$sql = 'SELECT "tablename" FROM "pg_tables" $sql = <<<SQL
WHERE "tablename" NOT LIKE pg\_% SELECT "tablename" FROM "pg_tables"
AND "tablename" NOT LIKE sql\%'; WHERE "tablename" NOT LIKE 'pg\_%'
AND "tablename" NOT LIKE 'sql\%'
SQL;
$res = $this->query($sql); $res = $this->query($sql);
@ -92,9 +94,11 @@ SQL;
*/ */
function get_system_tables() function get_system_tables()
{ {
$sql = 'SELECT "tablename" FROM "pg_tables" $sql = <<<SQL
WHERE "tablename" LIKE \'pg\_%\' SELECT "tablename" FROM "pg_tables"
OR "tablename" LIKE \'sql\%\''; WHERE "tablename" LIKE 'pg\_%'
OR "tablename" LIKE 'sql\%'
SQL;
$res = $this->query($sql); $res = $this->query($sql);
@ -140,8 +144,10 @@ SQL;
*/ */
function get_views() function get_views()
{ {
$sql = 'SELECT "viewname" FROM "pg_views" $sql = <<<SQL
WHERE viewname NOT LIKE pg\_%'; SELECT "viewname" FROM "pg_views"
WHERE "viewname" NOT LIKE 'pg\_%';
SQL;
$res = $this->query($sql); $res = $this->query($sql);