<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "How to add a search function effectively?"]]></title>
		<link>https://proxy2.de/forum/posts/list/5.php</link>
		<description><![CDATA[Latest messages posted in the topic "How to add a search function effectively?"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>How to add a search function effectively?</title>
				<description><![CDATA[ The following adds a good search capability to the gbook<br /> <br /> [code]<br /> &lt;?php<br /> // define db parameters in a file called config.php<br /> <br /> include&#40;&quot;config.php&quot;&#41;;<br /> $db = mysql_connect&#40;$dbhost, $dbusername, $dbpassword&#41;;<br /> mysql_select_db&#40;$dbname,$db&#41;;<br /> <br /> ?&gt;<br /> &lt;form method=&quot;POST&quot; action=&quot;&quot;&gt;<br /> Search Word&#58; &lt;input type=&quot;text&quot; name=&quot;query&quot;&gt;<br /> &lt;input type=&quot;SUBMIT&quot; value=&quot;Search!&quot;&gt;<br /> &lt;/form&gt;<br /> <br /> &lt;?<br /> // table_name should be book_data if default stuffs are used<br /> $result = mysql_query&#40;&quot;select * from Table_Name WHERE column1 LIKE '%$query%' OR column2 LIKE '%$query%'&quot;, $db&#41;;<br /> while&#40;list&#40;$column1, $column2&#41;=mysql_fetch_array&#40;$result&#41;&#41;&#123;<br /> echo &quot;Result&#58; $column1, $column2 &lt;br /&gt;&quot;;<br /> &#125;<br /> ?&gt;<br /> [/code]<br /> <br /> However the problems are 2 :<br /> <br />  :?:  the result will display the main post only and will miss the comments added onto the guestposts<br /> <br />  :?: pagination - if there are say 1000 results it needs to be paginated<br /> If pagination is not possible is it possible to limit the number of results to a prespecified value ?<br /> <br /> Any help will be greatly appreciated.]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/4918/17511.php</guid>
				<link>https://proxy2.de/forum/posts/preList/4918/17511.php</link>
				<pubDate><![CDATA[Mon, 8 Aug 2005 12:02:18]]> GMT</pubDate>
				<author><![CDATA[ riza]]></author>
			</item>
			<item>
				<title></title>
				<description><![CDATA[ I am curious as to why people would want to search a guestbook :-/]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/4918/17515.php</guid>
				<link>https://proxy2.de/forum/posts/preList/4918/17515.php</link>
				<pubDate><![CDATA[Mon, 8 Aug 2005 15:42:02]]> GMT</pubDate>
				<author><![CDATA[ Carbonize]]></author>
			</item>
			<item>
				<title></title>
				<description><![CDATA[ 1)Many guestbooks have already search function included like xeoman[ xeoman.com/ ]<br /> 2)Guestbooks can be searched for certain terms or phrases like "we want more of this and this" by the visitors - this can help to gauge the needs/demands of visitors particularly when one has say thousand or more entries<br /> 3)Guestbook is not just guestbook - at certain sites it is like a comment or suggestion book like a science site where one may like to look up certain terms that has been used more than others<br /> 4) Some more reasons .....<br /> <br /> By the way, do you have any working solution - I will be really grateful <img src="https://proxy2.de/forum//images/smilies/3b63d1616c5dfcf29f8a7a031aaa7cad.gif" />]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/4918/17517.php</guid>
				<link>https://proxy2.de/forum/posts/preList/4918/17517.php</link>
				<pubDate><![CDATA[Mon, 8 Aug 2005 18:41:35]]> GMT</pubDate>
				<author><![CDATA[ riza]]></author>
			</item>
			<item>
				<title></title>
				<description><![CDATA[ Not off the top of my head no. I get funny about people downloading a guestbook then using it as something else and complaining that it doesn't do something that a script dedicated to what they want would have. Thats a generic rant btw. The other one I got asked for recently was adding statistics to the guestbook <img src="https://proxy2.de/forum//images/smilies/2786c5c8e1a8be796fb2f726cca5a0fe.gif" /> <br /> <br /> As a quickies I'd say it would be simple enough. It's just a case of changing the query done for a normal guestbok display to the search query then it would be formated and paginated.]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/4918/17518.php</guid>
				<link>https://proxy2.de/forum/posts/preList/4918/17518.php</link>
				<pubDate><![CDATA[Mon, 8 Aug 2005 18:46:51]]> GMT</pubDate>
				<author><![CDATA[ Carbonize]]></author>
			</item>
			<item>
				<title></title>
				<description><![CDATA[ Oh and as to limitting yes just use LIMIT <img src="https://proxy2.de/forum//images/smilies/8a80c6485cd926be453217d59a84a888.gif" />]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/4918/17519.php</guid>
				<link>https://proxy2.de/forum/posts/preList/4918/17519.php</link>
				<pubDate><![CDATA[Mon, 8 Aug 2005 18:47:33]]> GMT</pubDate>
				<author><![CDATA[ Carbonize]]></author>
			</item>
			<item>
				<title></title>
				<description><![CDATA[ Having looked yes it would be simple(ish) to do. Bit more complicated if you want to do more than search for a single string (ie if you want to use operators in the search). It would be just a case of checking if they aer performing a search in index.php and then creating the query for the search and passing it on to the entry retrieval (echo $gb-&gt;show_entries($entry, $SEARCHQUERY)<img src="https://proxy2.de/forum//images/smilies/8a80c6485cd926be453217d59a84a888.gif" /> and then adding the new variable to the functions that get called and switching the query in [b]get_entries[/b]]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/4918/17520.php</guid>
				<link>https://proxy2.de/forum/posts/preList/4918/17520.php</link>
				<pubDate><![CDATA[Mon, 8 Aug 2005 18:53:16]]> GMT</pubDate>
				<author><![CDATA[ Carbonize]]></author>
			</item>
			<item>
				<title></title>
				<description><![CDATA[ [quote]I get funny about people downloading a guestbook then using it as something else and complaining that it doesn't do something [/quote]<br /> <br /> Hello Carbonize, I am not complaining at all <img src="https://proxy2.de/forum//images/smilies/3b63d1616c5dfcf29f8a7a031aaa7cad.gif" /><br /> this script is as wonderful as it can be, and I was just wondering if things further could be done !<br /> However we always grow and uses come into play, like I said, many gbs have this function already implemented.<br /> <br /> Even, html does a lot more than what it was intended to be <img src="https://proxy2.de/forum//images/smilies/3b63d1616c5dfcf29f8a7a031aaa7cad.gif" /><br /> <br /> Adding just LIMIT is not helping and as I said the result page will show the main post or comment and not the comment-on-comments as they belong to different tables <img src="https://proxy2.de/forum//images/smilies/9d71f0541cff0a302a0309c5079e8dee.gif" /><br /> <br /> Any REAL help will be greatly appreciated.]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/4918/17521.php</guid>
				<link>https://proxy2.de/forum/posts/preList/4918/17521.php</link>
				<pubDate><![CDATA[Mon, 8 Aug 2005 18:53:45]]> GMT</pubDate>
				<author><![CDATA[ riza]]></author>
			</item>
			<item>
				<title></title>
				<description><![CDATA[ My last post make sense to you?]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/4918/17524.php</guid>
				<link>https://proxy2.de/forum/posts/preList/4918/17524.php</link>
				<pubDate><![CDATA[Mon, 8 Aug 2005 21:56:15]]> GMT</pubDate>
				<author><![CDATA[ Carbonize]]></author>
			</item>
			<item>
				<title></title>
				<description><![CDATA[ Hello Carbonize, <br /> <br /> Thanks <img src="https://proxy2.de/forum//images/smilies/3b63d1616c5dfcf29f8a7a031aaa7cad.gif" />  The last post makes sense.<br /> <br /> However ,perhaps I have been unable to explain what I was looking for in my very first post.<br /> <br /> [quote]then creating the query for the search [/quote]<br /> the actual problem is at this step. I am no mysql expert and so I was asking for actual codes - the way i create the search query covers only the comments and not the subcomments ( that is comments on comment ).  Thus I am dealing with the table book_data , but I also need to deal with table book_com in the same go. How ??<br /> <br /> The other part was to paginate the results.<br /> <br /> Any further help from anyone will be sincerely appreciated.]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/4918/17527.php</guid>
				<link>https://proxy2.de/forum/posts/preList/4918/17527.php</link>
				<pubDate><![CDATA[Tue, 9 Aug 2005 00:14:19]]> GMT</pubDate>
				<author><![CDATA[ riza]]></author>
			</item>
			<item>
				<title></title>
				<description><![CDATA[ Only realistic way of searching both entries and comments would require you to make your own output format as you couldn't really use the current guestbooks formatting. As to searching both tables possibly a JOIN may do it. Then again maybe not. I'll think about it.]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/4918/17528.php</guid>
				<link>https://proxy2.de/forum/posts/preList/4918/17528.php</link>
				<pubDate><![CDATA[Tue, 9 Aug 2005 00:20:42]]> GMT</pubDate>
				<author><![CDATA[ Carbonize]]></author>
			</item>
	</channel>
</rss>