note 100609 added to function.ibase-query
| From: | ksn7 at ymail dot com | Date: | Tue, 26 Oct 2010 19:05:24 +0000 |
| Subject: | note 100609 added to function.ibase-query | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-173477@lists.php.net to get a copy of this message | ||
Hello, I have a problem with ibase_query and do not know what to do, have run behind several
solutions but none had the success expected. I wonder why giving the error:
Dynamic SQL Error SQL error code = @ 1 Token unknown - line @ 1, column 2 @ @ 1
This occurs when I try to change the data. When I try to delete already appears another error:
conversion error from string "@ 1" in
CODE:
operacoes.php
<?php include ("conexao_fb.php");
$acao = $_POST["acao"];
$cod = $_POST["codigo"];
$nome = $_POST["nome"];
$endereco = $_POST["endereco"];
$cidade = $_POST["cidade"];
$estado = $_POST["uf"];
if ($acao=="Inserir")
{
$sql = "INSERT INTO CADASTRO
(nome, endereco, cidade, uf)
VALUES
('$nome',
'$endereco',
'$cidade',
'$estado')";
ibase_query($sql) or die("Não foi possível inserir dados");
print "<script type = 'text/javascript'> location.href =
'index.php?pagina=3'</script>";
}
if ($acao=="Alterar")
{
$sql= ("UPDATE CADASTRO SET
nome ='$nome',
endereco = '$endereco',
cidade='$cidade'
uf='$estado' WHERE CODIGO='" .$cod. "'");
$resultado = ibase_query($sql)
or die (ibase_errmsg());
print "<script type = 'text/javascript'> location.href =
'index.php?pagina=3'</script><br>";
}
if ($acao=="Excluir")
{
$sql = ("DELETE FROM CADASTRO WHERE CODIGO='" .$cod. "'");
ibase_query($sql) or die("Não foi possível excluir dados");
print "<script type = 'text/javascript'> location.href =
'index.php?pagina=3'</script>";
}
?>
Please, HELP ME!!!
----
Server IP: 69.147.83.197
Probable Submitter: 187.127.195.98
----
Manual Page -- http://www.php.net/manual/en/function.ibase-query.php
Edit -- https://master.php.net/note/edit/100609
Del: integrated -- https://master.php.net/note/delete/100609/integrated
Del: useless -- https://master.php.net/note/delete/100609/useless
Del: bad code -- https://master.php.net/note/delete/100609/bad+code
Del: spam -- https://master.php.net/note/delete/100609/spam
Del: non-english -- https://master.php.net/note/delete/100609/non-english
Del: in docs -- https://master.php.net/note/delete/100609/in+docs
Del: other reasons-- https://master.php.net/note/delete/100609
Reject -- https://master.php.net/note/reject/100609
Search -- https://master.php.net/manage/user-notes.php