Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.12.3

Request #6194 function _isAlreadyQuoted and _quoteIdentificator behavior
Submitted: 2005-12-08 16:47 UTC
From: i at buro dot com dot ru Assigned:
Status: Wont fix Package: DB
PHP Version: 4.3.11 OS: FC3
Roadmaps: (Not assigned)    
Subscription  


 [2005-12-08 16:47 UTC] i at buro dot com dot ru
Description: ------------ When method _quoteIdentifier is called it's just simply put quote marks on the sides if id. It can be dangerous and misleading when sequantially called on the same data(field id). So Request is to make implementation aware of double quotation on field ids. It should not be public method just simply inner behavior of _quoteIdentifier function.

Comments

 [2005-12-09 10:36 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2005-12-09 21:25 UTC] i at buro dot com dot ru
Its a bit tricky. Suppose i have this table id | int(10) unsigned | | PRI | NULL|auto_increment left | int(10) unsigned | | | 0 | right | int(10) unsigned | | | 0 | level | int(10) unsigned | | MUL | 0 | name | varchar(255) | | | | . In order to perform createRightNode with nested set i am to quote names like "`left`". Insertion consists of three queries two updates(line 1305,1315) and one insert(line 1345). So updates are made using sprintf (without quoting), and after that insert is made with _values2InsertQuery(line 1339), which quotes field names with _quoteIdentifier. So in order to make updates successfull i need to quote fields. But after these already quoted fields are quoted once more. And that is a bug. I guess createLeftNode, createSubNode have the same behavior.