Recommend this page to a friend! |
Classes of Marco Cesarato | Light PHP SQL Parser Class | README.md | Download |
|
DownloadPHP Light SQL Parser ClassVersion: 0.1.97 beta Github: https://github.com/marcocesarato/PHP-Light-SQL-Parser-Class Author: Marco Cesarato DescriptionThis class can parse SQL to get query type, tables, field values, etc.. It takes an string with a SQL statements and parses it to extract its different components. Currently the class can extract the SQL query method, the names of the tables involved in the query and the field values that are passed as parameters. This parser is pretty light respect phpsqlparser or others php sql parser. Requirements
InstallComposer
Usage
OR
MethodHow retrieve query method:
Output
TablesHow retrieve query tables:
Output
FieldsHow retrieve query fields:
Output
MethodsLightSQLParser| Method | Parameters | Description | | ----------- | ----------------------------------- | -------------------------------------------------- | | __construct | | Constructor | | setQuery | | Set SQL Query string | | method | param $query<br> return string | Get SQL Query method | | fields | param $query<br> return array | Get Query fields (at the moment only SELECTINSERTUPDATE) | | table | param $query<br> return string | Get SQL Query First Table | | tables | return array | Get SQL Query Tables | |