[PHP-DB] Wrong results with ORDER BY DESC

2008-05-28 Thread Michael Kelly
Hey all. I installed Apache and PHP onto my computer to use for testing about six days ago, and have had MySQL installed for a few weeks before. It all works fine, except for certain queries PHP gets very odd and inconsistent results back. Here's an example. This query, in both PHP and through

Re: [PHP-DB] Searching shopping cart

2008-05-28 Thread Chris
Ron Piggott wrote: > I am getting the following error when running the query through php my > admin: > > MySQL said: Documentation > > #1191 - Can't find FULLTEXT index matching the column list Grr - stupid manual didn't have a link on how to create the index. http://dev.mysql.com/doc/refman/5.

[PHP-DB] Searching shopping cart

2008-05-28 Thread Ron Piggott
I am getting the following error when running the query through php my admin: MySQL said: Documentation #1191 - Can't find FULLTEXT index matching the column list I am new to this; Thank you for the help. Ron On Wed, 2008-05-28 at 22:01 -0400, Ron Piggott wrote: > Someone referred me to: >

Re: [PHP-DB] Searching shopping cart

2008-05-28 Thread Chris
Ron Piggott wrote: > Someone referred me to: > > http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html > > Does this look like I am on the right track? > > Ron > > SELECT MATCH(shopping_cart_product.product_description, > shopping_cart_product.product_name) AGAINST ('$keyword') as Releva

[PHP-DB] Searching shopping cart

2008-05-28 Thread Ron Piggott
Someone referred me to: http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html Does this look like I am on the right track? Ron SELECT MATCH(shopping_cart_product.product_description, shopping_cart_product.product_name) AGAINST ('$keyword') as Relevance FROM ( shopping_cart_category INNER

[PHP-DB] Re: explode () and mySQL query

2008-05-28 Thread Chris
Ron Piggott wrote: > I am not sure why this isn't bringing any results: > > WHERE shopping_cart_product.product_description IN ('straying') > > The word straying is in the midst of one of the descriptions. Ahh, oops - didn't notice that before. "IN()" looks for specific entries, so unless the

[PHP-DB] Re: explode () and mySQL query

2008-05-28 Thread Ron Piggott
I am not sure why this isn't bringing any results: WHERE shopping_cart_product.product_description IN ('straying') The word straying is in the midst of one of the descriptions. Ron On Wed, 2008-05-28 at 20:13 -0400, Ron Piggott wrote: > I am trying to add a search feature to my shopping cart

Re: [PHP-DB] explode () and mySQL query

2008-05-28 Thread Chris
Ron Piggott wrote: > I am trying to add a search feature to my shopping cart. > > I am wanting to use PHP to develop the query for mySQL. I have the > following code figured out: > > foreach(explode(" ", $keyword) as $key) $query .= " $key, "; I hope this isn't a copy/paste from your code as it

[PHP-DB] explode () and mySQL query

2008-05-28 Thread Ron Piggott
I am trying to add a search feature to my shopping cart. I am wanting to use PHP to develop the query for mySQL. I have the following code figured out: foreach(explode(" ", $keyword) as $key) $query .= " $key, "; This produces: WHERE shopping_cart_product.product_description IN ( Jesus, is, Lo