I just tested the following on a table I have with a "name" field (prj_id 
in my case):

select prj_id from master_projects where prj_id like "R%" LIMIT 0, 30;

Works perfectly in the mysql shell;




>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.
>
>Thanks,
>Brett
>
>>Is it only pulling up the first record in a script that you are writing
>>(like in a PHP script) or does it also exhibit this behavior if you enter
>>your query from the mysql command line interface?
>>
>>If it is the former, I would imagine there is a problem with your script.
>>
>>HTH
>>
>>Sam Masiello
>>Software Quality Assurance Engineer
>>Synacor
>>(716) 853-1362 x289
>>[EMAIL PROTECTED]
>>
>>  -----Original Message-----
>>From:   winnecon [mailto:[EMAIL PROTECTED]]
>>Sent:   Monday, July 30, 2001 3:24 PM
>>To:     [EMAIL PROTECTED]
>>Subject:        Wild-card search problem
>>
>>
>>--
>>I have searched through all of the MySQL documentation I can get my
>>hands on, but still have no explanation for the following "wild-card
>>search" problem.
>>
>>I enter the following query:
>>
>>SELECT name,keywords,description from database_t where 1 and name
>>like "p%" LIMIT 0, 30;
>>-- or --
>>SELECT name,keywords,description from database_t where name like "p%"
>>LIMIT 0, 30;
>>
>>This should return all records where name starts with the letter P.
>>It only returns the first record (since the first record starts with P).
>>When I use any other letter or number no records are returned.
>>
>>The query is being performed on a 7000+ record database and should
>>pull up several hundred records starting with the letter P.
>>
>>I am running MySQL 3.23.40 on BSD UNIX (MAC OSX), but had the
>>identical problem with 3.23.28, 3.23.36 and 3.23.38.
>>
>>Thanks in advance,
>>Brett
>>
>>---------------------------------------------------------------------
>>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
>
>
>--
>
>---------------------------------------------------------------------
>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


Christopher R. Jones, P.Eng.
14 Oneida Avenue
Toronto, Ontario M5J 2E3
Tel. 416 203-7465
Fax. 416 203-8249
Email [EMAIL PROTECTED]



---------------------------------------------------------------------
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

Reply via email to