Skip to content

Commit abda0ff

Browse files
committed
Minor README improvements
Signed-off-by: William Desportes <williamdes@wdes.fr>
1 parent cae464c commit abda0ff

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ A validating SQL lexer and parser with a focus on MySQL dialect.
1616

1717
Please use [Composer][1] to install:
1818

19-
```
19+
```sh
2020
composer require phpmyadmin/sql-parser
2121
```
2222

@@ -53,6 +53,7 @@ All commands are able to parse input from stdin (standard in), such as:
5353
echo "SELECT 1" | ./vendor/bin/highlight-query
5454
cat example.sql | ./vendor/bin/lint-query
5555
```
56+
5657
### Formatting SQL query
5758

5859
```php
@@ -77,7 +78,7 @@ echo $flags['querytype'];
7778
```php
7879
require __DIR__ . '/vendor/autoload.php';
7980

80-
$query1 = "select * from a";
81+
$query1 = 'select * from a';
8182
$parser = new PhpMyAdmin\SqlParser\Parser($query1);
8283

8384
// inspect query
@@ -103,18 +104,21 @@ var_dump($query2); // outputs string(19) 'SELECT * FROM "b" '
103104
## Localization
104105

105106
You can localize error messages installing `phpmyadmin/motranslator` version `5.0` or newer:
107+
106108
```sh
107109
composer require phpmyadmin/motranslator:^5.0
108110
```
109111

110112
The locale is automatically detected from your environment, you can also set a different locale
111113

112114
**From cli**:
115+
113116
```sh
114117
LC_ALL=pl ./vendor/bin/lint-query --query "SELECT 1"
115118
```
116119

117120
**From php**:
121+
118122
```php
119123
require __DIR__ . '/vendor/autoload.php';
120124

0 commit comments

Comments
 (0)