PHP代码整理

操作mysql

<?php

  $link = mysql_connect('127.0.0.1', 'root', '');

  mysql_select_db('test');

  $result = mysql_query('select * from mine', $link);

  while($row = mysql_fetch_array($result)) {

    echo $row['id'] . ' ' . $row['uid'];

  }

?>
View Code

 

你可能感兴趣的:(PHP)