Posted By

LondonWeb on 08/20/08


Tagged

mysql data list simplified


Versions (?)

dataList - Listar dados


 / Published in: PHP
 

Simplified form to extract data through MySQL

  1. include("conx.php");
  2.  
  3. //----depois o RS
  4. $Tabela = "clientes";
  5.  
  6. $SQL = "SELECT * FROM $Tabela ORDER BY Nome ASC";
  7. $rs = mysql_query("$SQL");
  8.  
  9. //-----> Depois o Loop
  10.  
  11. <? while ($x = mysql_fetch_assoc($rs)){ ?>
  12. <? echo $x['campo1'] ?>
  13. <? } ?>

Report this snippet  

You need to login to post a comment.