SMF Support > SMF 2.0.x Support

The database does not exist: is_approved ?

(1/3) > >>

xyxis_fahim:
Hello,
When I try to merge a Topic in SMF 2 , and error reporting
 "The database value you're trying to insert does not exist: is_approved"  comes on.

What may be the cause?

Thank you.

ONLiNEZONE:

--- Quote from: xyxis_fahim on May 18, 2008, 03:58:58 PM ---Hello,
When I try to merge a Topic in SMF 2 , and error reporting
 "The database value you're trying to insert does not exist: is_approved"  comes on.

What may be the cause?

Thank you.

--- End quote ---

I think it might be an error in the database
If you use cPanel for WebServer Administration then tell me.

xyxis_fahim:
Yes it is Cpanel.

H:
Are you running beta3?

Have you tried running Admin area > Forum Maintenance > Find and Repair errors?

Dragooon:
OK Just looking at the code, I think it is a bug
See this query

--- Code: --- $request = $smcFunc['db_query']('', '
SELECT t.id_topic, m.subject, m.id_member, IFNULL(mem.real_name, m.poster_name) AS poster_name
FROM {db_prefix}topics AS t
INNER JOIN {db_prefix}messages AS m ON (m.id_msg = t.id_first_msg)
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.id_member)
WHERE t.id_board = {int:id_board}
AND t.id_topic != {int:id_topic}' . ($onlyApproved ? '
AND t.approved = {int:is_approved}' : '') . '
ORDER BY {raw:sort}
LIMIT {int:offset}, {int:limit}',
array(
'id_board' => $_REQUEST['targetboard'],
'id_topic' => $_GET['from'],
'sort' => (!empty($modSettings['enableStickyTopics']) ? 't.is_sticky DESC, ' : '') . 't.id_last_msg DESC',
'offset' => $_REQUEST['start'],
'limit' => $modSettings['defaultMaxTopics'],
)
);
--- End code ---
(Around line 898-915 in SplitTopics.php in the function MergeIndex)
There is AND t.approved = {int:is_approved} But no is_approved in the values array.

Navigation

[0] Message Index

[#] Next page

Go to full version