Put this line:

$GLOBALS['debug_last_sql'] = $db_string;

at line 240 of /Sources/Subs.


  - 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.


Perkiset's Place Home   Politics @ Perkiset's