troubleshooting Question

bindValue override

Avatar of tonelm54
tonelm54 asked on
2 Comments1 Solution83 ViewsLast Modified:
Im trying to debug several SQL statments, and thinking a way around is to override the 'bindValue' method so I can log what is being bound to the query. So what I currently do is:-
$rsRowImport = $this->pdo->prepare($this->JSONRec['SQL']);
$rsRowImport->bindValue(':field`, 'Test'l,PDO::PARAM_STR);

So, what I want to do is override the return of prepare to $rwRowImport, and then override the bindValue so I can add in a logging method, then I can call the parent bindValue to do the actual bindValue.

My issue is, I have no idea how i can capture what is returned and then override it. Any ideas?
Ben Sch
Software Engineer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros