From bf7ace7169694e5f021c27fbaa1e30342283d9ed Mon Sep 17 00:00:00 2001 From: Joe Green Date: Mon, 2 Mar 2015 18:02:34 +0000 Subject: [PATCH] Update README.md --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 20c07b3..da0d165 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ Features: * Sub Queries * Nested Queries * Bulk Inserts +* MySQL `SELECT * INTO OUTFILE '...'` * Lazy Connections * PSR Compatible Logging * Database Connection Resolver @@ -80,6 +81,7 @@ $connection->query("SELECT id, username FROM customers"); - [Group By, Order By and Having](#group-by-order-by-and-having) - [Joins](#joins) - [Sub Selects](#sub-selects) + - [MySQL Outfile](#mysql-outfile) - [Insert](#insert) - [Insert Ignore](#insert-ignore) - [Replace](#replace) @@ -350,6 +352,22 @@ $count = $connection->table('users')->avg('age'); $count = $connection->table('users')->sum('age'); ``` +####MySQL Outfile + +```PHP +$connection + ->table('users') + ->select('*') + ->where('bar', '=', 'baz') + ->intoOutfile('filename', function(\Database\Query\OutfileClause $out){ + $out + ->enclosedBy(".") + ->escapedBy("\\") + ->linesTerminatedBy("\n\r") + ->fieldsTerminatedBy(','); + })->query(); +``` + ###Insert ```PHP $data = array(