Pedrovsn Posted September 25, 2011 Report Share Posted September 25, 2011 (edited) AAA Edited March 15, 2012 by Pedrovsn Quote Link to comment Share on other sites More sharing options...
0 ESerra Posted September 25, 2011 Report Share Posted September 25, 2011 A consulta tem algum problema, troque:$sql = mysql_query("SELECT * FROM sobre where id = '1'");Por:$sql = mysql_query("SELECT * FROM sobre where id = '1'")OR DIE(mysql_error());Isto fará com que o MySQL informe qual o erro... Quote Link to comment Share on other sites More sharing options...
0 Pedrovsn Posted September 26, 2011 Author Report Share Posted September 26, 2011 (edited) AAA Edited March 15, 2012 by Pedrovsn Quote Link to comment Share on other sites More sharing options...
0 lcerbaro Posted September 26, 2011 Report Share Posted September 26, 2011 (edited) Com relação ao while, você precisa definir o escopo de trabalho dele:while ($linha = mysql_fetch_array($sql)) { $foto = $linha["foto"]; $texto = $linha["texto"]; ?> <img src="fotos/ <? echo $foto ?> " style="float:left; padding-right:5px;" /> <? echo $texto ?> } Edited September 26, 2011 by lcerbaro Quote Link to comment Share on other sites More sharing options...
Question
Pedrovsn
AAA
Edited by PedrovsnLink to comment
Share on other sites
3 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.