Hi everybody;First sory about my english, I hope you can understand me.The following code was working perfect in PHP + MySql, but I need change to MsSql, something is wrong but I can't found the error.Here is the error:PHP Warning: mssql_query() [function.mssql-query]: message: Incorrect syntax near '='. (severity 15) in E:\home\abc1\Web\admin\editor_alt.php on line 16PHP Warning: mssql_query() [function.mssql-query]: Query failed in E:\home\abc1\Web\admin\editor_alt.php on line 16
Here is the line 16:$query_texto = mssql_query($sql_texto) or die(mssql_get_last_message());
And here is my code:<?include "conexao.php";include "FCKeditor/fckeditor.php";$id_select = $_GET['id'];$id = $_POST['id'];$titulo = $_POST['titulo'];$texto = $_POST['texto'];if ((isset($_POST['id'])) && ($_POST['titulo']) && ($_POST['texto'])){ $sql = "UPDATE editor SET titulo='$titulo', texto='$texto' where id=$id";$result = mssql_query($sql) or die(mssql_get_last_message());header("Location: editor_mostra.php");}$sql_texto = "SELECT * FROM editor where id=$id_select";$query_texto = mssql_query($sql_texto) or die(mssql_get_last_message());$row_texto = mssql_fetch_assoc($query_texto);$id = $row_texto['id'];$titulo = $row_texto['titulo'];$texto = $row_texto['texto'];?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>RGM</title><!-- File js of FCK Editor--><script type="text/javascript" src="FCKeditor/fckeditor.js"></script></head><body><form method="post" name="form" action="<?=$_SERVER['PHP_SELF']?>"><b>Titulo</b><input name="titulo" value="<?php echo "$titulo"; ?>" type="text" size="40" maxlength="200"><br/><br/><? $editor = new FCKeditor("texto");$editor-> BasePath = "FCKeditor/";$editor->ToolbarSet = "Basic2";$editor-> Value = "$texto"; $editor-> Width = "600"; $editor-> Height = "300";$editor-> Create();?><input type="submit" value="Alterar"><input type="hidden" name="id" value="<?php echo "$id"; ?>"></form></body></html>Thank you for any help