Jump to content

Query Help


The Little Guy

Recommended Posts

I have this, and it gets 10 results (10 = $results_per_page)($s = current page number increment by 10 starting at 0)

If I use just this, It will give me total results = 10, even when there are more than 10 results is there any way of doing this with out doing two queries?

[code]$sql = "SELECT *,
MATCH(urltitle,body,url) AGAINST ('%$var% IN BOOLEAN mode') AS score
FROM web_search
WHERE MATCH(urltitle,body,url) AGAINST ('%$var% IN BOOLEAN mode') LIMIT $s, $results_per_page";[/code]
Link to comment
https://forums.phpfreaks.com/topic/30190-query-help/
Share on other sites

[quote author=simcoweb link=topic=118140.msg482499#msg482499 date=1165817588]
Perhaps you're looking for a way to paginate your results? Meaning, it would display 10 results per page but place a Next 10 or page links to the other results?
[/quote]

That is what Im already doing.

if I make it where I use 2 query, won't It slow it way down, since it has to do the search 2 times?
Link to comment
https://forums.phpfreaks.com/topic/30190-query-help/#findComment-139337
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.