Testing Parametrized Queries

Hi Experts,

I am starting a new application and I decided to use parametrized queries, which is my first time using them.

However, when I used regular queries with variable substitution, I could just echo my query, then copy it into phpMyAdmin and play with it to see if something is wrong with my SQL or with my values. Now, that my values and SQL is separate, is there any way I can temporarily converse my parametrized query to show on my browser with the appropriate values?

Thank you
APD TorontoSoftware DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ray PaseurCommented:
You might be better off to use some automation for this process.  You can use PHPUnit and Mockery to achieve what you need.  These testing tools allow you to set up test assertions that detail the expectations from each element of a unit test.  It takes a little bit of time to set up the unit tests for your systems, but once you have done it you can rerun all of the unit tests in a matter of seconds.  It becomes a standard part of the development process, before anything is pushed to the repository.  And since you can rerun the entire suite of tests so quickly (a single command), you can test almost every little change as you refactor to be sure a change in one place did not break anything in another place!

Have a look at the man pages and know that you'll find most professional developers using exactly these same tools!

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.