function _support_comment_update_node in Support Ticketing System 6
Same name and namespace in other branches
- 7 support.module \_support_comment_update_node()
Helper function.
1 call to _support_comment_update_node()
- support_comment in ./
support.module - Implementation of hook_comment().
File
- ./
support.module, line 1746 - support.module
Code
function _support_comment_update_node($nid) {
$cid = db_result(db_query('SELECT MAX(cid) FROM {comments} WHERE nid = %d', $nid));
if ($cid) {
$comment = db_fetch_object(db_query('SELECT state, priority, client, assigned FROM {support_ticket_comment} WHERE cid = %d', $cid));
db_query('UPDATE {support_ticket} SET state = %d, priority = %d, client = %d, assigned = %d WHERE nid = %d', $comment->state, $comment->priority, $comment->client, $comment->assigned, $nid);
}
}