Jump to content

Warning: mysqli_num_rows() expects exactly 1 parameter, 2 given


freshbrains

Recommended Posts

Hello

 

Theres something wrong with my code as I keep getting this error. It points to the bottom line of code. Can you tell me whats wrong with it please?

 

Thank you :)

$connection= mysqli_connect("$db_server","$db_username","$db_password", "$db_database") or die ("could not connect to mysql"); 
$sqlCommand = mysqli_query($connection,"SELECT * FROM client WHERE username='$myusername' and password='$mypassword'");

$count = mysqli_num_rows($connection,$sqlCommand);

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.