Comments (10)
From [email protected] on May 09, 2011 07:04:34
Hmm, I've written : There is no data "RESULT" into the array.
It should be corrected to : There is no data "RESULT" or "VALUES" into the array.
from php-sql-parser.
From [email protected] on May 09, 2011 11:38:24
Thanks for the report. I'll look into this ASAP.
Status: Started
Owner: [email protected]
Labels: -Priority-Medium Priority-High
from php-sql-parser.
From [email protected] on October 19, 2011 20:24:39
Here is a simple fix. Move case 'VALUES' into its own category, and check if the next token is blank before consuming two tokens:
[code]
case 'VALUES':
$token_category = $upper;
if($tokens[$token_number+1]=="")
continue 2;
else
continue;
break;
[/code]
from php-sql-parser.
From [email protected] on October 19, 2011 20:44:34
Just in case this isn't clear how to fix. Around line 334 in the source code, you see a list of case statements like this:
case 'SELECT':
case 'ORDER':
case 'LIMIT:
...
find the "case 'VALUES'" and remove it, and make a new section between the following "break;" statement and the next new "case" statement (as in case 'DELETE')). That new section should contain the code pasted in my previous comment.
Hope this helps!
from php-sql-parser.
From [email protected] on February 02, 2012 00:24:24
Solved in current version on http://www.phosco.info/php-sql-parser_current.zip
from php-sql-parser.
From [email protected] on March 05, 2012 02:39:33
[email protected], this also doesn't appear to have been implemented in the link provided above.
from php-sql-parser.
From [email protected] on March 05, 2012 04:10:48
I have added a test for the this issue (see file insert.php in directory "t"). The test is okay, so it seems, that the solution works.
Try the repository on https://www.phosco.info/publicsvn/php-sql-parser I have no commit rights on the original codebase, so I provide the changes on my own Subversion.
from php-sql-parser.
From [email protected] on March 07, 2012 06:40:50
I confirm that code provided by "[email protected]" fixed my issue.
from php-sql-parser.
From [email protected] on March 07, 2012 06:42:40
I confirm that code provided by "[email protected]" fixed my issue, at least for long text. About blob, I didn't test it yet.
from php-sql-parser.
From [email protected] on March 12, 2012 14:49:32
I have accepted the contribution which fixes this bug.
Status: Fixed
from php-sql-parser.
Related Issues (20)
- TRUNCATE in SELECT ends up in its own category
- Negative numbers prefixed with a space are not parsed correctly
- coma in function return true, false
- PHP 8.1 supporting HOT 12
- Valid query is parsed and re-created as invalid query (misplaced bracket)
- Valid query is parsed and re-created as invalid query (SQL function arguments stripped)
- Warning: Undefined variable $currCategory in C:\Users\manue\PhpstormProjects\untitled\vendor\greenlion\php-sql-parser\src\PHPSQLParser\processors\ReferenceDefinitionProcessor.php
- Valid query is parsed and re-created as invalid query (too many comma in group_concat)
- Parser fails when string contains `'` followed by `--`
- Missing data type aliases HOT 1
- 'Class not found' error HOT 1
- Support for PHP and PHPUnit versions discrapency
- Cannot calculate position if there are no space between parentheses and next query part
- CHARACTER keyword as alias of CHAR type spoils parsing CHARACTER SET utf8
- PHPSQLCreator doesn't seem to support /*comment*/ "unknown [expr_type] = comment in "WHERE" [x]" HOT 1
- CURRENT_TIMESTAMP is detected as a reserved word an generate errors when used in JOIN clause
- How to support postgresql
- "WITH" clause with comments, temporary table name is wrong.
- CREATE TABLE mytable SELECT ... throws exception in PositionCalulator Line 199
- Incredible slow parsing HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-sql-parser.