First you can get the total:
select COUNT(*) from primaryinfo
where match(title,description,tags) against('searchCombine')
and category='abc'
and technology='pqr'
Then you can paginate using the LIMIT
feature:
select * from primaryinfo
where match(title,description,tags) against('searchCombine')
and category='abc'
and technology='pqr'
LIMIT 0 10; -- Start at offset 0 show ten items per page
Please note that the mysql_*
functions are deprecated and will be removed in a future PHP version. Please consider using mysqli
or PDO
.
To further improve performance you could look at setting up indexes on columns. Particularly the category and technology columns but this will depend on your data.