You are here: Re: Problem with lower( « PHP SQL « IT news, forums, messages
Re: Problem with lower(

Posted by strawberry on 11/07/06 11:04

Mad Hatter wrote:
> Hi
>
> I'm trying to find data in a database. The data is in mixed case. I'm
> trying to find all occurances of a particular string but the string isn't
> in the same case all the time. For example I could be looking for the word
> 'fred' but in the database it could be 'Fred', 'FRED', 'fred' etc. I'm
> using the following which seems to work on some servers but not others.
>
> $q="SELECT id FROM $dbfilenames WHERE type='b' AND LOWER(name) LIKE
> '%$se%'";
>
> Any thoughts as to why this works on some and not on others and a possible
> work around for it?

Odd, I would have guessed that LOWER was redundant in this context,
because only BOOLEAN MODE searches are case sensitive in MySQL. Can you
echo the query so we can see exactly what's being submitted?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация