2014年5月4日星期日

php sql query and fetch results

$sql = "SHOW TABLES FROM $dbname";
$result = mysql_query($sql);

while ($row = mysql_fetch_row($result)) {
    echo "Table: {$row[0]}\n";
}

没有评论:

发表评论