Thanks. I will check into this and get back to you.
I have another table that I want the info from, so that it is displayed in the postbit, but I want to beable to do it with one query, instead of everytime there is a postbit displayed, like I currently have.
I was hoping that I could somehow "add on" to the $post, or $user or $thread array's with this info....
--------------- Added [DATE]1198802924[/DATE] at [TIME]1198802924[/TIME] ---------------
Sorry for another question but..
on line 965, there is the $hook_query_fields, this is where I would put the "select" statement that I want to add to this correct?
on line 977, this is where I would put the table I want to grab from?
and then where do I put my "where" statement "hook" ??
--------------- Added [DATE]1198805317[/DATE] at [TIME]1198805317[/TIME] ---------------
EDIT: I think I've done this correctly, as it is working now.. for other people that are interested
I put this into a plugin, using the
showthread_query hook location.
PHP Code:
<?php
// Attaches to the $hook_query_fields in showthread.php, line 965
$hook_query_fields .= ", " . TABLE_PREFIX . "tablename.field AS fieldname";
// Attaches to $hook_query_joins in showthread.php, line 977
$hook_query_joins .= "
LEFT JOIN " . TABLE_PREFIX . "tablename AS tablename ON(tablename.id = othertablename.id)";
?>
Now I haven't added any extra queries to my page, thus keeping overhead down on SQL.
This particular example can be access by $post[] array, so $post[fieldname]
Thanks for the lead into the right direction Opserty