> Unfortunately, the problem is not in any one script. It is a
> universally repeatable error and happens even when using MySQL in the
> command line.
>
> I tried the suggested SQL query below, but it returned the same
> result as before. (Only the first record.)
> SELECT name,keywords,description from database_t where Left(name, 1) ='p'
> LIMIT 0, 30;
>
> Other wildcard searches function perfectly - i.e., a search for '%p%'
> yields every record containing the letter P.
>
> Can anyone think of a way in which this problem might be
> data-related? I have thought it over and checked the data
> thoroughly, but perhaps there is something I am missing.
What are the column definitions? Are any of them declared BINARY
or are they BLOBs rather than TEXTs? In these cases, MySQL will
use a case-sensitive LIKE, which might not be what you expected.
Another thing: The first form ("p%") will make use of any indexes
you might have on the field, while the second form ("%p%") will
not. You may wish to recreate the indexes just to be sure.
/ Carsten
--
Carsten H. Pedersen
keeper and maintainer of the bitbybit.dk MySQL FAQ
http://www.bitbybit.dk/mysqlfaq
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php