perkiset

Put this line:

$GLOBALS['debug_last_sql'] = $db_string;

at line 240 of /Sources/Subs.

php

  - then anywhere in the code where SMF uses the db_query() function, immediately after it you can say print "{$GLOBALS['debug_last_sql'])<br>" and see what was just thrown at the database. Vurrah handy because they often create the SQL in the function call itself, and pulling it out so that you can see it is a pain.

/p


Perkiset's Place Home   Politics @ Perkiset's