Hi everybody,First of all, I'm sorry but I've posted the same message on the osTicket 1.7 disccusion and could not remove it...I'm trying to implement custom forms fields value to e-mail template.I juste have a problem that I don't understand.I've done the request :$sql
= 'SELECT ans.value FROM ' . FORM_ENTRY_TABLE . ' entry JOIN ' .
FORM_ANSWER_TABLE . ' ans ON ans.entry_id = entry.id JOIN ' .
FORM_FIELD_TABLE . ' field ON field.id = ans.field_id WHERE
entry.object_id = ' . $this->getId() . ' AND field.name = "' . $name.
'"';if(($res=db_query($sql)) && db_num_rows($res)){}($this->getId()
= ticket_id and $name is the variable name entered on the custom
form. This modification is only on the class.ticket.php.)But the
result looks empty... I tried to launch request on mysql and it returns
me the searched values. Have I done a mistake or is there a problem
with the db_query() function ?The var_dump of $res = db_query($sql) returns me : object(mysqli_result)#144 (5) {
=>
int(0)
=>
int(3)
=>
NULL
=>
int(0)
=>
int(0)
}Why is everything empty ?I would really appreciate some help, I'm becoming creazy, 5 hours to try make work this request...Thank youosTicket : 1.8.0.2PHP : 5.3.27MySQL : 5.5.27