I am not sure why I am getting below error while running 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 '' at line 1
This is on centos clodlinux serever Server version: 10.3.18-MariaDB-cll-lve MariaDB Server
$data = mysql_query("SELECT subject, dateline, ticketid, fullname, departmentid, priorityid, firstpostid FROM `swtickets` WHERE ticketstatusid = 1 AND ticketid > ".$_newticket["lastnewticketid"]." ORDER BY dateline ASC LIMIT 1") or die(mysql_error()); while($temp = mysql_fetch_array( $data )) {
$_newticket = $temp; }
$data = mysql_query("SELECT contents FROM `swticketposts` WHERE ticketpostid =". $_newticket["firstpostid"]) or die(mysql_error()); while($temp = mysql_fetch_array( $data )) $_newticket["messagecontents"] = $temp['contents'];}
I have trie to edit $_newticket["firstpostid"."] but still getting same error.