PHP code example of marcocesarato / sqlparser
1. Go to this page and download the library: Download marcocesarato/sqlparser library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
marcocesarato / sqlparser example snippets
$parser = new LightSQLParser("UPDATE Customers AS alias SET ContactName = 'Marco Cesarato', City = 'Milan' WHERE ID = 1;");
$parser = new LightSQLParser();
$parser->setQuery("UPDATE Customers AS alias SET ContactName = 'Marco Cesarato', City = 'Milan' WHERE ID = 1;");
$parser->getMethod();
$parser->getTable();
$parser->getAllTables();
$parser->getFields();
array(1) {
[0]=>
string(9) "Customers"
}