FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Will this work?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Will this work? [message #172257 is a reply to message #172253] Tue, 08 February 2011 13:36 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 2/8/2011 8:06 AM, Derek Turner wrote:
> On Tue, 08 Feb 2011 01:27:46 +0000, Denis McMahon wrote:
>
>> Note that an empty result set is still a result set!
>>
>> This might be neater, and allows you to use an integer for your loop:
>
> <snip>
>
> Thanks but I'm searching for a string like "02-" so $i needs to be a
> string.
>
> $sql = "SELECT `workName`, `composer`, SUBSTRING(`Reference`,LOCATE(\'08-
> \',`Reference`)) as TRACK FROM `work` WHERE `Reference` LIKE \'%08-%\'
> ORDER BY TRACK";
>
> works fine but I want to search on "01-" ... "99-" stopping when I get a
> zero result. Thanks for the heads-up on zero-result != false, that, and
> your fix are very helpful.
>

Which is exactly what Dennis's code does. Did you try it?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Question about binary transfers in POST requests
Next Topic: file_put_contents not creating file
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 10 13:43:14 GMT 2024

Total time taken to generate the page: 0.04190 seconds