Page 4 of 4

SQL ERROR [ mysqli ]

Posted: 17 Nov 2011, 21:43
by Stoker
RMcGirr83 wrote:For starters using quote for coloring purposes
WHERE ' . $db->sql_in_set('t.forum_id', $flist) . ' AND topic_moved_id = 0 AND topic_approved
ORDER BY topic_last_post_time DESC';
I dont understand what you mean. Can you give me a copy and paste example?

RMcGirr83 wrote:you are missing the table delineation (aka t) and topic_approved should have a value....eg

Code: Select all

		WHERE ' . $db->sql_in_set('t.forum_id', $flist) . ' AND t.topic_moved_id = 0 AND t.topic_approved = 1
		ORDER BY t.topic_last_post_time DESC';
Thanks, I understand this part :)

RMcGirr83 wrote:

Code: Select all

and forum_type = 1
should be

Code: Select all

AND forum_type = ' . FORUM_POST . '
Wouldnt that result in categories being displayed?


RMcGirr83 wrote:The tabbing is also off within this file

Code: Select all

if (!defined('INCLUDES_FUNCTIONS_TOP_STATS_PHP'))
{
	define('INCLUDES_FUNCTIONS_TOP_STATS_PHP', true);
	
	$flist = $auth->acl_getf('f_read', true);
	$flist = array_unique(array_keys($flist));
	
// Recent Active Topics
if (!empty($config['tsrat_enable']) && sizeof($flist))
{
which is more of a readability thing than anything else and indent is your friend!! :)
I will try look harder. But I cant find any problems with the tabbing.

SQL ERROR [ mysqli ]

Posted: 17 Nov 2011, 22:22
by doktornotor
Stoker wrote:
RMcGirr83 wrote:For starters using quote for coloring purposes
I dont understand what you mean. Can you give me a copy and paste example?
LOL. He meant that you can use colors in quote tags (unlike in code tags) to highlight the problematic parts so the post is easier to read and the issue is more visible... There is nothing to c'n'p here. :D

SQL ERROR [ mysqli ]

Posted: 18 Nov 2011, 05:48
by RMcGirr83
Wouldnt that result in categories being displayed?
within the constants.php file FORUM_POST === 1, FORUM_CAT === 0

Code: Select all

define('FORUM_CAT', 0);
define('FORUM_POST', 1);
define('FORUM_LINK', 2);

SQL ERROR [ mysqli ]

Posted: 18 Nov 2011, 07:41
by Stoker
Thanks for the heads up :thumb: