Skip to content

Commit 1906ee6

Browse files
committed
Improve README.md
Signed-off-by: William Desportes <[email protected]>
1 parent 4fb2692 commit 1906ee6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,27 +84,27 @@ $parser = new PhpMyAdmin\SqlParser\Parser($query1);
8484
var_dump($parser->statements[0]); // outputs object(PhpMyAdmin\SqlParser\Statements\SelectStatement)
8585

8686
// modify query by replacing table a with table b
87-
$table2 = new \PhpMyAdmin\SqlParser\Components\Expression("", "b", "", "");
87+
$table2 = new \PhpMyAdmin\SqlParser\Components\Expression('', 'b', '', '');
8888
$parser->statements[0]->from[0] = $table2;
8989

9090
// build query again from an array of object(PhpMyAdmin\SqlParser\Statements\SelectStatement) to a string
9191
$statement = $parser->statements[0];
9292
$query2 = $statement->build();
93-
var_dump($query2); // outputs string(19) "SELECT * FROM `b` "
93+
var_dump($query2); // outputs string(19) 'SELECT * FROM `b` '
9494

9595
// Change SQL mode
9696
PhpMyAdmin\SqlParser\Context::setMode('ANSI_QUOTES');
9797

9898
// build the query again using different quotes
9999
$query2 = $statement->build();
100-
var_dump($query2); // outputs string(19) "SELECT * FROM "b" "
100+
var_dump($query2); // outputs string(19) 'SELECT * FROM "b" '
101101
```
102102

103103
## Localization
104104

105-
You can localize error messages installing `phpmyadmin/motranslator` version `3.0` or newer:
105+
You can localize error messages installing `phpmyadmin/motranslator` version `5.0` or newer:
106106
```sh
107-
composer require phpmyadmin/motranslator:^3.0
107+
composer require phpmyadmin/motranslator:^5.0
108108
```
109109

110110
The locale is automatically detected from your environment, you can also set a different locale
@@ -120,7 +120,7 @@ require __DIR__ . '/vendor/autoload.php';
120120

121121
$GLOBALS['lang'] = 'pl';
122122

123-
$query1 = "select * from a";
123+
$query1 = 'select * from a';
124124
$parser = new PhpMyAdmin\SqlParser\Parser($query1);
125125
```
126126

0 commit comments

Comments
 (0)