summaryrefslogtreecommitdiffstats
path: root/examples/examples.php
diff options
context:
space:
mode:
authorJeremy Dorn <jeremy@jeremydorn.com>2013-02-10 15:48:03 -0800
committerJeremy Dorn <jeremy@jeremydorn.com>2013-02-10 15:48:03 -0800
commitd9a72005ce780b73f4839a2d4931d12236bcca11 (patch)
tree5ff435a4669a06b6a8e3e1ac133bd12a760e0d15 /examples/examples.php
parentda55bd76098f872b44343ba456db868cbcac8776 (diff)
downloadsql-formatter-d9a72005ce780b73f4839a2d4931d12236bcca11.zip
sql-formatter-d9a72005ce780b73f4839a2d4931d12236bcca11.tar.gz
sql-formatter-d9a72005ce780b73f4839a2d4931d12236bcca11.tar.bz2
Improving splitQuery method. Fixes #22
Diffstat (limited to 'examples/examples.php')
-rw-r--r--examples/examples.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/examples/examples.php b/examples/examples.php
index 467f405..af02304 100644
--- a/examples/examples.php
+++ b/examples/examples.php
@@ -74,6 +74,20 @@ $split_statements = array(
abc\";
SELECT a,b #comment;
FROM test;",
+
+ "
+ -- Drop the table first if it exists
+ DROP TABLE IF EXISTS MyTable;
+
+ -- Create the table
+ CREATE TABLE MyTable ( id int );
+
+ -- Insert values
+ INSERT INTO MyTable (id)
+ VALUES
+ (1),(2),(3),(4);
+
+ -- Done",
);
// Example statements for removing comments