Hi,
well nobody seems to have the same problem or an answer.. so I tried to figure out what the problem seems to be but im getting stuck;
Trying with an existing ticket I found out the sql to get the ticket is:
SELECT ticket.ticket_id,ticket.ticketID,ticket.dept_id,ispublic,subject,name,email,dept_name,status,source,priority_id ,ticket.created ,count(attach_id) as attachments FROM ost_ticket ticket LEFT JOIN ost_department dept ON ticket.dept_id=dept.dept_id LEFT JOIN ost_ticket_attachment attach ON ticket.ticket_id=attach.ticket_id WHERE email='pauldevenny@hotmail.com' GROUP BY ticket.ticket_id ORDER BY ticket.created DESC LIMIT 0,20
which actually works fine if I run it on my phpmyadmin and returns the ticket I'm searching for.
Now in the code I see:
$tickets_res = db_query($query);
and:
db_num_rows($tickets_res);
The db_num_rows() always seems to say there are 0 rows which is obviously not true.. The $tickets_res does exist (can't echo it but it does exist testing with isset() )
so this lets me to belive db_num_rows is a not working function. Problem is can't find it anywhere in the OSticket files and as far as I can see on php.net this is not a existing php function.
Now I've tried replacing db_num_rows($tickets_res) with mysql_num_rows($tickets_res) but that just returns 'false' so probably $tickets_res is not a result set.. but what is it then?!
Where is db_query function?
so now I'm a bit puzzled.. can anybody in the DEV team or so help me out here? I'm probably missing something but can't see what..