/**
* 列出mysql表的所有行和列
*
* @param
* @arrange 512-笔记网: www.512Pic.com
**/
$user = root;
$pass = ;
$db = mydatabase;
$link = mysql_connect( localhost,$user,$pass );
if ( ! $link ) {
die( Couldn't connect to MySQL: .mysql_error() );
}mysql_select_db( $db,$link ) or die ( Couldn't open $db: .mysql_error() );$result = mysql_query( SELECT * FROM domains where sex='F' );
$num_rows = mysql_num_rows( $result );print <p>$num_rows women have added data to the table</p>\n;print <table>;
while ( $a_row = mysql_fetch_row( $result ) ) {
print <tr>;
foreach ( $a_row as $field ) {
print <td>.stripslashes($field).</td>;
}
print </tr>;
}
print </table>;
mysql_close( $link );
/*** 来自编程之家 jb51.cc(jb51.cc) ***/
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。