Hi all,
I am just having some confusion here. Currently, I am trying to write my own SQL script. I create a new php file under SCP folder and try out some simple SQL statement. For example, $sql ='SELECT ticket.number as number FROM '.TICKET_TABLE.' ticket ' .' WHERE ticket.ticket_id=1'; $result = db_query($sql); $row = db_fetch_array($result); echo $row;I realized that there are some files like include/staff/tickets.inc.php does not have database connection query statement and can directly run the SQL statement to get the result. However, I can't get any result by running the simple SQL statement above. I would like to ask is there any function that is connecting to database that I miss out here?