Re: sql query

From: Date: Tue, 19 Feb 2002 01:37:08 +0000
Subject: Re: sql query
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-17044@lists.php.net to get a copy of this message
Thanks I will try that. "Beau Lebens" <B.Lebens@curtin.edu.au> wrote in message news:A2B098B4E624D511BED900508BB92A5701CA4EDB@exmsb02.curtin.edu.au... > try replacing > > WHERE display=$custcatergory"); > > with > > WHERE display='$custcatergory'"); > > and also tru echoing the value of that SQL statement (assign it to a var > first) to make sure you are getting the right thing. > > HTH > > /b > > // -----Original Message----- > // From: CrossWalkCentral [mailto:webmaster@crosswalkcentral.net] > // Sent: Tuesday, 19 February 2002 9:31 AM > // To: php-db@lists.php.net > // Subject: [PHP-DB] sql query > // > // > // 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"; > // } > // > //

« previous php.db (#17044) next »