Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix repead params sql #387

Merged
merged 3 commits into from May 19, 2018
Merged

Bug fix repead params sql #387

merged 3 commits into from May 19, 2018

Conversation

webmailcontatos
Copy link
Contributor

@webmailcontatos webmailcontatos commented May 18, 2018

Before fix it :
select * from geral.person p
left join geral.contract c
on c.id_person = p.id_person
where c.status = <1> and
p.status <> :status;

`
public function testRepeadParamsQuery()
{

 $sql = 'select *
            from geral.person p
            left join geral.contract c
              on c.id_person = p.id_person
            where c.status = :status and 
                  p.status <> :status';
    $params = array(
        ':status' => 1
    );

    $traced = new TracedStatement($sql, $params);
    $expected = 'select *
            from geral.person p
            left join geral.contract c
              on c.id_person = p.id_person
            where c.status = <1> and 
                  p.status <> <1>';
    $result = $traced->getSqlWithParams();
    $this->assertEquals($expected, $result);

}`

@barryvdh barryvdh merged commit 4048ff4 into maximebf:master May 19, 2018
leomoty pushed a commit to leomoty/php-debugbar that referenced this pull request Aug 9, 2018
* Bug fix repead params sql

* Fix array

* Fix array
leomoty pushed a commit to leomoty/php-debugbar that referenced this pull request Aug 9, 2018
* Bug fix repead params sql

* Fix array

* Fix array
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants