05-07-2009, 11:08 PM
|
#6 (permalink)
|
|
The Gregarious
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
|
Quote:
Originally Posted by Village Idiot
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...
|
|
|
|