2017-04-02 4 views
-11
$result=mysqli_query($connection,$query); 
if(mysqli_affected_rows($connection)==1) 
+1

関連セクション –

答えて

0

$接続パラメータは文字列として与えられますが、mysqliオブジェクトである必要があります。 〜からphp docs

$link = mysqli_connect("localhost", "my_user", "my_password", "world"); 

/* check connection */ 
if (mysqli_connect_errno()) { 
    printf("Connect failed: %s\n", mysqli_connect_error()); 
    exit(); 
} 

/* Create table doesn't return a resultset */ 
if (mysqli_query($link, "CREATE TEMPORARY TABLE myCity LIKE City") === TRUE) { 
    printf("Table myCity successfully created.\n"); 
} 
関連する問題