I have this sql command that gives me result from search
$query = mysql_query("SELECT * FROM persons WHERE FirstName LIKE '%"
. $searchText . "%' ORDER by RAND() LIMIT $offset,$per_page");
can anyone teach me if i can get the number of result so that i can replace the value of pagination this is the value of pagination so it only counts the whole table and numbers of rows.
$count_query = mysql_query("SELECT COUNT(personid) AS numrows FROM persons");
I know it will only count all of the rows so it gives me all the result in numbers. I want to the query so that it will only count the result when I press enter from my search it is in jquery . can i assign a query that will count the $query variable rows result?