View Single Post
Old 05-07-2009, 11:08 PM   #6 (permalink)
allworknoplay
The Gregarious
 
allworknoplay's Avatar
 
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
allworknoplay is on a distinguished road
Default

Quote:
Originally Posted by Village Idiot View Post
When I debug queries in .net, I use the following steps:
1. Output the formatted query that you are sending. That means you echo the exact same string you are giving the database. That can reveal potential errors that are in the variables.
2. Simulate a correct query in the database viewer.
3. Erase the query and re-write it from square one
4. Repeat

I've only had to ask two questions regarding queries in the last year with this method.
Very much agree on #1. So many times when I put the query in the database itself, CLI, it doesn't work. If it works via CLI, it will most surely work in your PHP scripts...
allworknoplay is offline  
Reply With Quote