Welcome Guest, Not a member yet? Register   Sign In
How to do this in CodeIgniter ?
#1

[eluser]Flyingbeyond[/eluser]
I want to know how to programming the search method in our CI forum.

for example, if I search the keywords 'search' in CI forum.
I was redirected to the following two pages:

http://ellislab.com/forums/do_search/

http://ellislab.com/forums/search_result...b8c169df0/

how to generate this string '4723c4426561046da4a7202b8c169df0' and what is this string for?

thanks
#2

[eluser]Clooner[/eluser]
[quote author="Flyingbeyond" date="1275312439"]I want to know how to programming the search method in our CI forum.

for example, if I search the keywords 'search' in CI forum.
I was redirected to the following two pages:

http://ellislab.com/forums/do_search/

http://ellislab.com/forums/search_result...b8c169df0/

how to generate this string '4723c4426561046da4a7202b8c169df0' and what is this string for?

thanks[/quote]

You can generate an unique id with the php function uniqueid. I guess it is simply a way to identify the search result later. You probably want to do that using flashvars and not paste it in the url these days. I believe it might be used to prevent lockups / delays / double clicking and so on.
#3

[eluser]mddd[/eluser]
I would say that string is a reference to a cached set of search results.

That way you only have to do the search once, and then if the user comes back to the results page (using the back button of the browser) you can find the results immediately instead of having to search the database again.
#4

[eluser]Clooner[/eluser]
[quote author="mddd" date="1275312678"]I would say that string is a reference to a cached set of search results.

That way you only have to do the search once, and then if the user comes back to the results page (using the back button of the browser) you can find the results immediately instead of having to search the database again.[/quote] Also this or to be able to paginate the results. there are many reasons you might want to do this
#5

[eluser]Flyingbeyond[/eluser]
Get it Smile thanks to clooner and mddd.




Theme © iAndrew 2016 - Forum software by © MyBB