Jump to content

numbers of rows are not returned


narjis

Recommended Posts

I am accessing my datbase bookorama with the follwoiung code

@ $db= new mysqli('localhost','bookorama', 'bookorama123','bookorama');
$query = "select * from books where ". $searchtype." like '%".$searchterm."%'";
$results =$db->query($query);
$num_results = $result->num_rows;

the last line is being echoed but it does not give the number of rows in it. Please help me.

I'm stuck

Link to comment
https://forums.phpfreaks.com/topic/227968-numbers-of-rows-are-not-returned/
Share on other sites

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.