My MySQL statement is not running properly on my PHP page. The statement itself appears to be getting cut off. Others have had similar problems—as shown in this thread as well as this thread—but they were using reserved words in their statements.
But according to what I can see from the MySQL documentation, I don't believe I am using any.
When I run this query:
$ticket_query = "
SELECT myticket.number,
myticket.status,
myticket.created,
myticket.source,
myticket.ticket_id,
myticket.lastresponse,
myticket__cdata.subject,
myticket__cdata.priority,
FROM myticket
INNER JOIN myticket__cdata
ON myticket.ticket_id = myticket__cdata.ticket_id
WHERE (myticket.status = 'open');";
I get this error on my PHP page:
There was an error running the ticket query [You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FROM myticket INNER JOIN myticket__cdata ON myticket.ticket_id = o' at line 9]
However, when I run it formatted like this:
$ticket_query = "
SELECT myticket.number,
myticket.status,
myticket.created,
myticket.source,
myticket.ticket_id,
myticket.lastresponse,
myticket__cdata.subject,
myticket__cdata.priority,
FROM myticket INNER JOIN myticket__cdata ON myticket.ticket_id = myticket__cdata.ticket_id
WHERE (myticket.status = 'open');";
I get this error on my PHP page:
There was an error running the ticket query [You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FROM myticket INNER JOIN myticket__cdata ON myticket.ticket_id = osti_t' at line 9]
I'm kind of stuck here and I'm assuming it is something small I am missing.