<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1013347" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1013347</link>
    <description></description>
    <language>en</language>
          <item>
    <title>I was handed a solution by a</title>
    <link>https://www.webmaster-forums.net/web-database-development/trying-get-returns-html-docs#comment-1233083</link>
    <description> &lt;p&gt;I was handed a solution by a colleague:&lt;/p&gt;
&lt;p&gt;add &lt;strong&gt;$ingredient = $_REQUEST[&#039;ingredient&#039;];&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;WORKS!&lt;br /&gt;
&lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Fri, 05 Sep 2008 02:13:59 +0000</pubDate>
 <dc:creator>mmi</dc:creator>
 <guid isPermaLink="false">comment 1233083 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Hey
Like a voice (hopefully</title>
    <link>https://www.webmaster-forums.net/web-database-development/trying-get-returns-html-docs#comment-1233042</link>
    <description> &lt;p&gt;Hey&lt;/p&gt;
&lt;p&gt;Like a voice (hopefully not &lt;em&gt;too&lt;/em&gt; nightmarish) from the somewhat distant past, I&#039;ve returned to yer friendly community in an effort to get the little search engine on mmy recipe page working again. It stopped working a few years ago when I moved the code to a different server. Yesterday, I again tried changing the username — and it worked!&lt;br /&gt;
&lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Well, I got a result at least. The problem is: the code designed to cause a subset of the recipes to be returned (those with an ingredient matching the string entered in the textbox) isn&#039;t functioning. You instead get &lt;em&gt;all&lt;/em&gt; the recipes held in the db (currently only about fifteen or so that I&#039;ve entered for testing).&lt;/p&gt;
&lt;p&gt;Here&#039;s the &lt;a href=&quot;http://ememi.com/cmw/realindex.html&quot;&gt;search page&lt;/a&gt;. Here&#039;s the code for results.php&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;CMW Search Results for &amp;lt;? echo $ingredient ?&amp;gt;&amp;lt;/title&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;SCRIPT LANGUAGE=javascript TYPE=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;function openCmwWindow(){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cmwWindow=window.open(&amp;#039;&amp;#039;,&amp;#039;cmwWin&amp;#039;,&amp;#039;menubar=yes,status=yes,scrollbars=no,resizable=yes,width=740,height=420&amp;#039;);}&lt;br /&gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;STYLE TYPE=&amp;quot;text/css&amp;quot;&amp;gt;&amp;lt;!--&lt;br /&gt;&lt;br /&gt;BODY {font: 10pt Tahoma; color: #fffff0}&lt;br /&gt;SPAN {font: 500 13pt Tahoma; color: #f4c508}&lt;br /&gt;A {font: 600 14pt Tahoma; color:orange; text-decoration:none}&lt;br /&gt;&lt;br /&gt;--&amp;gt;&amp;lt;/style&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;body bgcolor=&amp;quot;#000080&amp;quot; text=&amp;quot;#000000&amp;quot; id=all&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;div width=&amp;quot;95%&amp;quot; align=&amp;quot;right&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://ememi.com/cmw/realindex.html&amp;quot;&amp;gt;another&amp;lt;br&amp;gt;search &amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;?&lt;br /&gt;&lt;br /&gt;$db = mysql_connect(&amp;quot;localhost&amp;quot;, &amp;quot;username&amp;quot;,&amp;quot;password&amp;quot;);&lt;br /&gt;&lt;br /&gt;mysql_select_db(&amp;quot;mmi_ememicom&amp;quot;,$db);&lt;br /&gt;&lt;br /&gt;$query = &amp;quot;SELECT * FROM RECIPES WHERE (ing1 LIKE &amp;#039;%$ingredient%&amp;#039;) OR (ing2 LIKE &amp;#039;%$ingredient%&amp;#039;) OR (ing3 LIKE &amp;#039;%$ingredient%&amp;#039;)&amp;quot;;&lt;br /&gt;&lt;br /&gt;$query .= &amp;quot; AND (ing1 IS NOT NULL) AND (ing2 IS NOT NULL) AND (ing3 IS NOT NULL)&amp;quot;;&lt;br /&gt;&lt;br /&gt;if (mysql_errno()) { echo mysql_error(); }&lt;br /&gt;&lt;br /&gt;$result = mysql_query($query,$db);&lt;br /&gt;&lt;br /&gt;if (mysql_num_rows($result) == 0) {&lt;br /&gt;&lt;br /&gt;?&amp;gt; &amp;lt;SPAN&amp;gt; &amp;lt;? echo &amp;quot;Sorry, no recipes for that - try another ingredient&amp;quot;; ?&amp;gt; &amp;lt;/span&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;?&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;while ($recipe = mysql_fetch_array($result)) {&lt;br /&gt;&lt;br /&gt;?&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;a href=&amp;quot;&amp;lt;? echo $recipe[href]; ?&amp;gt;&amp;quot; target=&amp;quot;cmwWin&amp;quot;&amp;gt;&amp;lt;? echo $recipe[recipe]; ?&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;a href=&amp;quot;&amp;lt;? echo $recipe[href]; ?&amp;gt;&amp;quot; target=&amp;quot;cmwWin&amp;quot;&amp;gt;&amp;lt;span&amp;gt;&amp;lt;? echo $recipe[recipes]; ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;?&lt;br /&gt;&lt;br /&gt;}&amp;nbsp; #END while&lt;br /&gt;&lt;br /&gt;?&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Anything jump out as a reason for &lt;em&gt;all&lt;/em&gt; recipes being returned?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
 </description>
     <pubDate>Thu, 04 Sep 2008 04:26:54 +0000</pubDate>
 <dc:creator>mmi</dc:creator>
 <guid isPermaLink="false">comment 1233042 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/trying-get-returns-html-docs#comment-1078022</link>
    <description> &lt;p&gt;looking good &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/big.png&quot; title=&quot;Laughing out loud&quot; alt=&quot;Laughing out loud&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Sat, 10 Feb 2001 07:53:37 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1078022 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Couldn&#039;t have Made it Without your help</title>
    <link>https://www.webmaster-forums.net/web-database-development/trying-get-returns-html-docs#comment-1077955</link>
    <description> &lt;p&gt;thanks as always for the useful info - my understanding is that ASPs can only run on Windows NT servers and since my provider has those &quot;no longer patchy&quot; ones, I figger I can&#039;t do &#039;em - I kinda expected that there wasn&#039;t gonna be a way around the limitations of these wildcards but at least now I KNOW that&#039;s the case and I can express an intelligent opinion about an alternative - you really helped me out on this to say the least and I very much appreciate it - CMW is &lt;a href=&quot;http://ememi.com/cmw.html&quot; class=&quot;bb-url&quot;&gt;Cooking My Way&lt;/a&gt; - ya might wanna check out the navbar&#039;s index !! &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/nerdy.png&quot; title=&quot;Cool&quot; alt=&quot;Cool&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Thu, 08 Feb 2001 15:48:36 +0000</pubDate>
 <dc:creator>mmi</dc:creator>
 <guid isPermaLink="false">comment 1077955 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/trying-get-returns-html-docs#comment-1077939</link>
    <description> &lt;p&gt;I&#039;m not sure what you want to do.  What do you want &quot;pa&quot; to return? nothing?&lt;/p&gt;
&lt;p&gt;you can do a strict search by taking out the wildcards.  So &quot;pa&quot; will not return anything, and &quot;salt&quot; will only match &quot;salt&quot; and not &quot;saltines&quot;.&lt;/p&gt;
&lt;p&gt;If you want you could get even wilder, and allow the user to choose &#039;partial word&#039; matches, &#039;exact phrases&#039;, or &#039;any word&#039;.&lt;/p&gt;
&lt;p&gt;Example... search criteria: &quot;apple pie&quot;&lt;br /&gt;
&lt;strong&gt;Partial word&lt;/strong&gt; would break up the spaces and search for anything with &quot;apple&quot; or &quot;pie&quot; in it.  This could return &quot;apple&quot;, &quot;pie&quot;, &quot;apple pie&quot;, and &quot;pineapple&quot;.&lt;br /&gt;
&lt;strong&gt;Exact phrase&lt;/strong&gt; would search for just that... the exact phrase. and return only &quot;apple pie&quot;.&lt;br /&gt;
&lt;strong&gt;Any word&lt;/strong&gt; would split the spaces and search for &quot;apple&quot; or &quot;pie&quot;.  And return &quot;apple&quot;, and &quot;pie&quot;.  But not &quot;pineapple&quot;&lt;/p&gt;
&lt;p&gt;If you want a search that powerful, it will require a bit of ASP coding.  So make a new post in the &#039;Other Scripting Languages Help Forums&#039;.&lt;/p&gt;
&lt;p&gt;I&#039;m drawing a blank... what&#039;s CMW?&lt;/p&gt;
 </description>
     <pubDate>Thu, 08 Feb 2001 07:47:58 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1077939 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>EXCELLENT !!</title>
    <link>https://www.webmaster-forums.net/web-database-development/trying-get-returns-html-docs#comment-1077867</link>
    <description> &lt;p&gt;this is great!! &lt;strong&gt;HOWEVER&lt;/strong&gt; &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/wink.png&quot; title=&quot;Wink&quot; alt=&quot;Wink&quot; class=&quot;smiley-content&quot; /&gt; , how should I try to handle the lollowing? - if ya type in, say, &quot;parsnip&quot;, I get the response I want - but is there any way to better manage an entry like &quot;pa&quot;? - right now I get Lasagna cuz it&#039;s got pasta and a chicken dish that features paprika - is a return like this the price I MUST pay for using the wildcards or is there a way to limit things and get a more &quot;reasoned&quot; response? btw, I suppose I&#039;ll be at least morally obligated to credit your contribution to CMW - or would that be an honor of dubious distinction? &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/big.png&quot; title=&quot;Laughing out loud&quot; alt=&quot;Laughing out loud&quot; class=&quot;smiley-content&quot; /&gt;&lt;br /&gt;
----------&lt;br /&gt;
guess I&#039;ll hafta dig out my Oracle / SQL books :eek:&lt;/p&gt;
 </description>
     <pubDate>Tue, 06 Feb 2001 17:22:07 +0000</pubDate>
 <dc:creator>mmi</dc:creator>
 <guid isPermaLink="false">comment 1077867 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>yeah, blah [code] blah</title>
    <link>https://www.webmaster-forums.net/web-database-development/trying-get-returns-html-docs#comment-1077844</link>
    <description> &lt;p&gt;thanks a lot &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/big.png&quot; title=&quot;Laughing out loud&quot; alt=&quot;Laughing out loud&quot; class=&quot;smiley-content&quot; /&gt; - I&#039;ll see what I can make &#039;a that mess after my nightly nap &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/eyeroll.png&quot; title=&quot;Roll eyes&quot; alt=&quot;Roll eyes&quot; class=&quot;smiley-content&quot; /&gt; &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/wink.png&quot; title=&quot;Wink&quot; alt=&quot;Wink&quot; class=&quot;smiley-content&quot; /&gt; - Produce Theater Productions is apparently gettin&#039; struck by the Teamsters at the moment - just wonderin&#039;, you got any ideas on how to get my &lt;a href=&quot;http://ememi.com/cmw/app_spin.html&quot; class=&quot;bb-url&quot;&gt;flippin&#039; apple&lt;/a&gt; integrated into this? - I&#039;ve been advised to move it from the &quot;search&quot; page to the &quot;results&quot; page? - does that seem more workable to you?&lt;/p&gt;
 </description>
     <pubDate>Tue, 06 Feb 2001 07:40:26 +0000</pubDate>
 <dc:creator>mmi</dc:creator>
 <guid isPermaLink="false">comment 1077844 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/trying-get-returns-html-docs#comment-1077841</link>
    <description> &lt;p&gt;Make this change to the query string....&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;// old&lt;br /&gt;$query = &amp;quot;SELECT * FROM RECIPES WHERE (ing1 LIKE &amp;#039;%$ingrediant%&amp;#039;) OR (ing2 LIKE &amp;#039;%$ingrediant%&amp;#039;) OR (ing3 LIKE &amp;#039;%$ingrediant%&amp;#039;)&amp;quot;;&lt;br /&gt;&lt;br /&gt;// new&lt;br /&gt;$query = &amp;quot;SELECT * FROM RECIPES WHERE (ing1 LIKE &amp;#039;%$ingrediant%&amp;#039;) OR (ing2 LIKE &amp;#039;%$ingrediant%&amp;#039;) OR (ing3 LIKE &amp;#039;%$ingrediant%&amp;#039;)&amp;quot;;&lt;br /&gt;$query .= &amp;quot; AND (ing1 IS NOT NULL) AND (ing2 IS NOT NULL) AND (ing31 IS NOT NULL)&amp;quot;;&lt;/code&gt;&lt;/div&gt;&#039;&lt;br /&gt;
then, check to see if you have any results....&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;if (mysql_num_rows($result) == 0) {&lt;br /&gt;&amp;nbsp; // &amp;quot;Sorry nuthin&amp;#039; on that&amp;quot;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;while ($recipe = mysql_fetch_array($result) {&lt;br /&gt;&amp;nbsp; // if there are no rows returned, this part will never be used&lt;br /&gt;&amp;nbsp; //&amp;nbsp; so don&amp;#039;t bother putting this in an IF statement&lt;br /&gt;&lt;br /&gt;&amp;nbsp; // blah (do your loop thing here) blah&lt;br /&gt;}&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
 </description>
     <pubDate>Tue, 06 Feb 2001 06:32:38 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1077841 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>default link, like a &quot;friendly 404&quot;</title>
    <link>https://www.webmaster-forums.net/web-database-development/trying-get-returns-html-docs#comment-1077836</link>
    <description> &lt;p&gt;well, here&#039;s one - how would I direct viewers to a page that says &quot;sorry, nuthin&#039; on that&quot;? -I&#039;m wonderin&#039; if this is gonna be complicated by the use of LIKE - I know a &lt;strong&gt;little&lt;/strong&gt; about db&#039;s and SQL and I&#039;m guessing that working out the final details on this may get complicated - thanks&lt;br /&gt;
---------&lt;br /&gt;
do I wanna test to see if the return on ingredient is null and then print a string? - is this something to be handled in SQL, PHP, js? - easily &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/confused.png&quot; title=&quot;Confused&quot; alt=&quot;Confused&quot; class=&quot;smiley-content&quot; /&gt; apparently &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/wink.png&quot; title=&quot;Wink&quot; alt=&quot;Wink&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;[Edited by mmi on Feb. 06, 2001 at 12:58 AM]&lt;/p&gt;
 </description>
     <pubDate>Tue, 06 Feb 2001 01:29:35 +0000</pubDate>
 <dc:creator>mmi</dc:creator>
 <guid isPermaLink="false">comment 1077836 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>ALMOST THERE!!</title>
    <link>https://www.webmaster-forums.net/web-database-development/trying-get-returns-html-docs#comment-1077755</link>
    <description> &lt;p&gt;go to &lt;a href=&quot;http://ememi.com/cmw.html&quot; class=&quot;bb-url&quot;&gt;Cooking My Way&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;click on &quot;index&quot; in the navbar&lt;/p&gt;
&lt;p&gt;type in an accepted keyword, e.g., cheese&lt;/p&gt;
&lt;p&gt;voilà!!&lt;/p&gt;
&lt;p&gt;just need to set up a timeout to let the apple spin for a couple &#039;a seconds - I&#039;m kinda concerned though cuz when I try to put the code back the way it was the movie displays but it&#039;s static &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/confused.png&quot; title=&quot;Confused&quot; alt=&quot;Confused&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Sat, 03 Feb 2001 07:55:48 +0000</pubDate>
 <dc:creator>mmi</dc:creator>
 <guid isPermaLink="false">comment 1077755 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
