makeBaseData1.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. //include $_SERVER['DOCUMENT_ROOT'].'/common/lib/comm.php';
  3. //include $_SERVER['DOCUMENT_ROOT'].ADMIN_PATH.'common/auth_chk.php';
  4. $connect = mysql_connect('cpro.interscope.co.kr','cpro','cprocpro') or die(mysql_error());
  5. mysql_select_db('cpro',$connect) or die(mysql_error());
  6. mysql_query("SET NAMES utf8");
  7. //$r = mysql_query("SELECT * FROM code_master");
  8. //$r = mysql_query("SELECT * FROM information_schema.columns WHERE table_schema = 'cpro' group by table_name order by table_name");
  9. $r = mysql_query("SELECT * FROM code_master");
  10. $i=1;
  11. while($col = mysql_fetch_array($r)) {
  12. // $table_name = $col[nm_code];
  13. ?>
  14. <table>
  15. <tr>
  16. <td><?=$col[nm_name]?></td>
  17. </tr>
  18. <?
  19. // $sql = "SELECT * FROM columns WHERE table_schema = 'cpro' and table_name = '$table_name' order by column_name";
  20. // echo $sql;
  21. // $rS = mysql_query("SELECT column_name FROM information_schema.columns WHERE table_schema = 'cpro' and table_name = '$table_name' order by ordinal_position");
  22. // $rS = mysql_query("SELECT column_name FROM information_schema.columns WHERE table_schema = 'cpro' and table_name = '$table_name' order by ordinal_position");
  23. // $j=1;
  24. // while($colS = mysql_fetch_array($rS)) {
  25. ?>
  26. <!-- <tr>
  27. <td>&nbsp;&nbsp;<?=$colS[column_name]?></td>
  28. </tr> -->
  29. <?
  30. // $j++;
  31. // }
  32. ?>
  33. </table>
  34. <?
  35. $i++;
  36. }
  37. mysql_close($connect);
  38. ?>