CodeIgniter Forums
How to do this in CodeIgniter ? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: How to do this in CodeIgniter ? (/showthread.php?tid=30919)



How to do this in CodeIgniter ? - El Forum - 05-31-2010

[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_results/4723c4426561046da4a7202b8c169df0/

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

thanks


How to do this in CodeIgniter ? - El Forum - 05-31-2010

[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_results/4723c4426561046da4a7202b8c169df0/

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.


How to do this in CodeIgniter ? - El Forum - 05-31-2010

[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.


How to do this in CodeIgniter ? - El Forum - 05-31-2010

[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


How to do this in CodeIgniter ? - El Forum - 05-31-2010

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