Tato.. 0 Denunciar post Postado Abril 13, 2012 Gente, estou usando o seguinte código: $cont = mysql_query("SELECT * post WHERE pagina=$idpag") or die(mysql_error()); while($post=mysql_fetch_array("$cont")){ $id=$post['id']; $titulo=$post['titulo']; $texto=$post['texto']; $id_autor=$post['id_autor']; } echo ('$id, $titulo, $texto, $id_autor'); e ele me reporta 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 'post WHERE 'pagina'=1' at line 1. Alguém sabe me dizer aonde eu errei? hehehe Obrigado desde já!! Compartilhar este post Link para o post Compartilhar em outros sites
Renato Augusto 3 Denunciar post Postado Abril 13, 2012 tente colocar a query assim $cont = mysql_query("SELECT * FROM post WHERE pagina = '$idpag' ")or die(mysql_error()); Compartilhar este post Link para o post Compartilhar em outros sites
Tato.. 0 Denunciar post Postado Abril 13, 2012 Deu certo... kkkkk não acredito que não senti falta do FROM ali.. hahahahha Mas muito obrigado.. ^^ Compartilhar este post Link para o post Compartilhar em outros sites