php mysqli query长度,php – 警告:mysqli_query()需要至少2个参数,...
我创建了一个PHP页面,它应该从数据库中选择两个名称并显示它们.它只是说:Warning: mysqli_query() expects at least 2 parameters, 1 given in /home/tdoylex1/public_html/dorkhub/index.php on line 4Warning: mysqli_query() expects at least 2
·
我创建了一个PHP页面,它应该从数据库中选择两个名称并显示它们.
它只是说:
Warning: mysqli_query() expects at least 2 parameters, 1 given in /home/tdoylex1/public_html/dorkhub/index.php on line 4
Warning: mysqli_query() expects at least 2 parameters, 1 given in /home/tdoylex1/public_html/dorkhub/index.php on line 8
我的代码是:
$name1 = mysqli_query("SELECT name1 FROM users
ORDER BY RAND()
LIMIT 1");
$name2 = mysqli_query("SELECT name FROM users
ORDER BY RAND()
LIMIT 1");
?>
DorkHub. The online name-rating website.DorkHub. The online name-rating website.
<?php echo $name1; ?>
against
<?php echo $name1; ?>
Who's sounds the dorkiest?
VOTE FOR FIRST
VOTE FOR LAST
更多推荐
已为社区贡献2条内容
所有评论(0)