error on update
| From: | Peter Lavender | Date: | Mon, 26 Nov 2001 00:28:28 +0000 |
| Subject: | error on update | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-75687@lists.php.net to get a copy of this message | ||
Hi everyone,
I'm connecting to a SQL SVR 2000 database and get an error that I haven't
been able to resolve.
The following code generates an error Incorrect syntax near 'longer'; SQL
state 3700 in SQLExecDirect
I read some where that it might be due to a reserved word in column names,
but this isn't the case.
Here is the code:
print("QID: $qID<br>Question to be updated to: $updateQuest");
$updateQuest = cleanUpText($updateQuest);
$query = "update tbl_question ";
$query .= "set question = '$updateQuest' ";
$query .= "where questID = '$qID';";
print("<br><b>Query</b>= $query<br>");
print("Cleaned up: $updateQuest<br>");
$result = odbc_exec($conn, $updateQuest);
unset($updateQuest);
I can copy and paste the resultant SQL and execute it fine in the query
analyser.