dedas Posted September 18, 2011 Report Share Posted September 18, 2011 Ae galera, to fazendo um sisteminha e deu o seguinte erro:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1Que p**** é essa ??? Quote Link to comment Share on other sites More sharing options...
0 ESerra Posted September 19, 2011 Report Share Posted September 19, 2011 Posta o script... Quote Link to comment Share on other sites More sharing options...
0 dedas Posted September 19, 2011 Author Report Share Posted September 19, 2011 <div align="center"> <table cellpadding="5" cellspacing="5"> <form action="acao/cidade.php?acao=editar" method="post"> <?php //PEGA VARIAVEL URL require 'classe/cidade.php'; $classe = new cidade_classe; $classe->codigo = $_GET['codigo']; $funcao = $classe->editar(); //CLASSE ?> <tr> <td colspan=2"><h1>Alteração</h1></td> </tr> <tr> <td>Nome</td> <td> <input type="text" name="cid_nome_form" value="<?php echo $funcao["nome]; ?>" maxlength="15" /> <input type="hidden" name="cid_codigo_form" value="<?php echo $funcao["codigo"]; ?>" /> </td> </tr> <tr> <td>UF</td> <td><input type=text" name="cid_uf_form" value="<?php echo $funcao["uf] ?>" maxlength="2" /></td> </tr> <tr> <td><input type="submit" value="alterar" /></td> </tr> </form> </table> </div><!-- #div -->eu descobri o que era =]eu estava colocando o $classe->codigo = $_GET['codigo']; embaixo do $funcao = $classe->editar();, ai ele tava executando a parte do sql sem ter o id.Foi so colocar o $classe->codigo pra cima que deu tudo certo =]Obrigado mais uma vez =D Quote Link to comment Share on other sites More sharing options...
Question
dedas
Ae galera, to fazendo um sisteminha e deu o seguinte erro:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
Que p**** é essa ???
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.