Yeah, I should have said that too - what Kokos means is do this:
PHP Code:
function get_heads($cat_id){
$qry = "select * from categories where menu_name = {$cat_id}"
$query = mysql_query($qry);
// etc
// then if things go wrong add this line:
echo $qry ;
Then you can see your query AND the variables that PHP has inserted for you (or not
) and then paste it into whatever you use to manage your database.
Instead of doing that, you can look in your mysql logfile.
As for finding your logs, my logs are in:
"C:\Program Files\MySQL\MySQL Server 5.0\data"
My logfile is usually that last file in that folder that has changed, go to the bottom of that file and you will see the last query mysql handled.
The logfile you want is normally called <name of your machine>.log
When it gets too long, delete it, and restart the mysql server in Services and it creates a new one.
Maybe there is an easier way?
Bookmarks