I am having a minor problem doing a simple sql query.
Error performing service query : You have an error in your SQL syntax near '' at line 1
Here is a snip of the code: Please let me know what you think.
if ($submit):
$status="0";
// REQUEST INFO FOR SERVICES
$results = mysql_query(
"SELECT * FROM supportsyscat WHERE display=$custcatergory");
if (!$results) {
echo("<P>Error performing service query : " .
mysql_error() . "</P>");
exit();
}
// Display the text
while ( $rows = mysql_fetch_array($results) ) {
$dservice=$rows["display"];
$eservice=$rows["address"];
}
$sql = "UPDATE supportsys SET " .
"pdes='$custpdes', " .
"sdes='$adminsdes', " .
"status='$status' " .
"WHERE ticket=$ticketnum";
if (mysql_query($sql)) {
Echo("<center><P><h4>Ticket #$ticketnum has been updated.</h4></P></center>");
Echo("Thank you $custfname $custlname");
Echo("<p>Problem: $custpdes</P>");
if ($statusclose =="true") {
$status="Closed";
} else {
$status ="Open";
}