[Phpmyadmin-devel] PMA_SQP_parse() 'pos' attribute

Chirayu Chiripal chirayu.chiripal at gmail.com
Thu Jun 5 12:41:03 CEST 2014


Hi,

the value 'pos' attribute as per phpdoc (sqlparser.lib.php, Line 65) is:
@param int    $pos      Position of an element

So, it should be the index of first character of the element but from [0]
it looks like it is set to index of the last character of element + 1.
Also, for quote_backtick types and few others the value of pos is 0.

What should be the appropriate value for pos?
(Considering 0-based indexing)
1. position of initial character of the element. (I personally prefer this
one).
2. position of last character of the element.
3. position of last character of the element + 1.

Is it used somewhere yet??, because changing its behaviour can cause side
effects.

[0]: http://pastebin.com/EQU3X8H6
-- 
Regards,
Chirayu Chiripal
phpMyAdmin Intern - Google Summer of Code 2014
https://chirayuchiripal.wordpress.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20140605/8fc7c831/attachment.html>


More information about the Developers mailing list