dataList - Listar dados


/ Published in: PHP
Save to your folder(s)

Simplified form to extract data through MySQL


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.