0

このファイルの何が問題なのかわかりません。Web サイトで行数を表示しようとしましたが、mysqli_num_rows 関数が機能しないようです。

<?php

$con4 = mysqli_connect("localhost", "username", "password", "db");

if (mysqli_connect_errno($con4))
  {
  echo "Failed to connect to MySQL: " . mysqli_connect_error();
  }


        $sqlquery4 = "SELECT * FROM `users` WHERE oauth_uid = '$uid' AND oauth_provider = '$oauth_provider'";
        $query = mysqli_query($con4, $sqlquery4);
        $result = mysqli_fetch_array($query);

        if( !empty($result) ) { /* user exist */  } else {

if( strlen($shkurtimi) > 0) { 
$vlera = $shkurtimi;
} else {
$vlera = $username;
}

$sqlusernameinjejte = "SELECT username, id, verifikuar FROM users WHERE username = '$vlera' AND verifikuar = 'po'";
$queryusernamenjejt = mysqli_query($con4, $sqlusernameinjejte);
$numusernamenjejt = mysqli_num_rows($queryusernamenjejt);
echo "1) number of rows --> " . $numusernamenjejt;

$sqlemailinjejte = "SELECT email, id, verifikuar FROM users WHERE email = '$email' AND verifikuar = 'po'";
$queryemailnjejt = mysqli_query($con4, $sqlemailinjejte);
$numemailnjejt = mysqli_num_rows($queryemailnjejt);
echo "2) number of rows --> " . $numemailnjejt;



        }

?>

何か案が?

ありがとう

4

0 に答える 0