summaryrefslogtreecommitdiffstats
path: root/examples/examples.php
diff options
context:
space:
mode:
authorjdorn <jeremy@jeremydorn.com>2012-05-08 23:29:40 -0700
committerjdorn <jeremy@jeremydorn.com>2012-05-08 23:29:40 -0700
commit4c6d7f11e8766ba49abf27afbcc0793df50ca7db (patch)
treeb90e7cac575483f3e85659e859927c82d737c6a2 /examples/examples.php
parentcd5e0db57afe55d4ed02235cdb6d9ef48fb84021 (diff)
downloadsql-formatter-4c6d7f11e8766ba49abf27afbcc0793df50ca7db.zip
sql-formatter-4c6d7f11e8766ba49abf27afbcc0793df50ca7db.tar.gz
sql-formatter-4c6d7f11e8766ba49abf27afbcc0793df50ca7db.tar.bz2
Fixing include path in examples. Added example with comments.
Diffstat (limited to 'examples/examples.php')
-rw-r--r--examples/examples.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/examples/examples.php b/examples/examples.php
index 3478e5d..df198c3 100644
--- a/examples/examples.php
+++ b/examples/examples.php
@@ -1,5 +1,5 @@
<?php
-require_once('SqlFormatter.php');
+require_once('../SqlFormatter.php');
$statements = array(
"SELECT * FROM MyTable WHERE id = 46",
@@ -17,7 +17,14 @@ $statements = array(
"delete from MyTable WHERE name LIKE \"test%\"",
- "SELECT * FROM UnmatchedParens WHERE ( A = B)) AND (((Test=1)"
+ "SELECT * FROM UnmatchedParens WHERE ( A = B)) AND (((Test=1)",
+
+ "-- This is a comment
+ SELECT
+ /* This is another comment
+ On more than one line */
+ Id #This is one final comment
+ as temp, DateCreated as Created FROM MyTable;",
);
foreach($statements as $sql) {