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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.