MyBB Community Forums

Full Version: mybb debug and my bb sql joins
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi all,

what is mybb debug and how to on this option and how to use it?

how to put sql joins in mybb db select query?


many thanks
john
still no reply, i am astonished , no body has tried any debug in mybb yet?

and still no body has tried join in mybb?????
Enable the debug output for admins only in the ACP Configuration area.

For complex queries, you should use something like this

$query = $db->query("SELECT p.pid, u.username, u.langage 
FROM ".TABLE_PREFIX."posts p 
INNER JOIN ".TABLE_PREFIX."users u 
ON p.uid=u.uid 
WHERE p.uid=1");

edit: changed from write_query to query since frostschultz pointed out
use regular query() for selects, write_query() for create/insert/update/replace