Skip to content

Not execute reset when an exception occur at _prepareQuery() method #380

@warmwinter

Description

@warmwinter

Because database table not exist, My script trigger this exception.
But i catch the exception in my script, then ignore it and continue my script.
Now,the where condition not reset. Per loop, $this->_where still add new where condition.
Example:
Right:

SELECT  * FROM db_table WHERE  uid = ?  ORDER BY uid ASC  LIMIT 1

Wrong after several cycles:

SELECT  * FROM db_table WHERE  uid = ? AND uid = ?  AND uid = ?  ORDER BY uid ASC  LIMIT 1

Fix it ? or not

If fix it, need reserve $this->_query and use it to exception message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions