警告:mysqli_query()預計至少2個參數,1 C中給出:\ Apache24 \ htdocs中\上線世界之窗\的index.php 27Recieving錯誤連接到數據庫時
警告:mysqli_num_rows()預計參數1 mysqli_result,null在C:\ Apache24 \ htdocs \ TheWorld \ index.php中給出的第29行
警告:mysqli_query()需要至少2個參數,在C:\ Apache24 \ htdocs \ TheWorld \ index中給出1 .php on line 31
警告:mysqli_num_rows()期望參數1爲mysqli_result,null中給出C:\ Apache24 \ htdocs \ TheWorld \ index.php,第33行
警告:mysqli_query()預計至少2個參數,1 C中給出:\ Apache24 \ htdocs中\上線55
.... 世界之窗\的index.php和我的代碼是:
第27行:
$u_check = mysqli_query("SELECT username FROM users WHERE username='$un'");
上線29
:
$check = mysqli_num_rows($u_check);
上線31
:
$e_check = mysqli_query("SELECT email FROM users WHERE email='$em'");
第33行:
$email_check = mysqli_num_rows($e_check);
,並在第55行:
$query = mysqli_query("INSERT INTO users VALUES ('','$un','$fn','$ln','$em','$pswd','$d','0','Write something about yourself.','','','no')");
是否有人可以幫忙嗎?
的可能重複的[mysqli的\ _query期望至少2個參數(http://stackoverflow.com/questions/8073278/mysqli-query-expects-at-least-2-parameters) – JasonMArcher 2014-12-30 18:30:01