Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #11256

Re: Will this work?

Path csiph.com!eeepc.pasdenom.info!news.pasdenom.info!news.dougwise.org!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Derek Turner <frderek@cesmail.net>
Newsgroups comp.lang.php
Subject Re: Will this work?
Date 8 Feb 2011 13:06:44 GMT
Lines 19
Message-ID <8rctf4Fnl3U1@mid.individual.net> (permalink)
References <8rbc1jFh6iU2@mid.individual.net> <4d509ce2$0$25004$bed64819@gradwell.net>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
X-Trace individual.net Jg2bgt47G2xA42GhBhL7jQ9v+9kOQowQ9C/i327WYD9HiGDndK
Cancel-Lock sha1:j2UPiO0ctyIZ4hD4AS5BHlO5pFI=
User-Agent Pan/0.133 (House of Butterflies)
Xref csiph.com comp.lang.php:11256

Show key headers only | View raw


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.

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Will this work? Derek Turner <frderek@cesmail.net> - 2011-02-07 23:03 +0000
  Re: Will this work? Denis McMahon <denis.m.f.mcmahon@googlemail.com> - 2011-02-08 01:27 +0000
    Re: Will this work? Derek Turner <frderek@cesmail.net> - 2011-02-08 13:06 +0000
      Re: Will this work? Jerry Stuckle <jstucklex@attglobal.net> - 2011-02-08 08:36 -0500

csiph-web