Re: Last Name extraction in query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 4, 2011 at 2:40 PM, Steve Staples <sstaples@xxxxxxxx> wrote:
> On Mon, 2011-04-04 at 14:06 -0400, Jim Giner wrote:
>> no - that address came back undeliverable.
>> >
>> > To subscribe to the list, send an empty message to
>> > <mysql-subscribe@xxxxxxxxxxxxxxx>
>> >
>> > Marc
>>
>>
>>
> http://lists.mysql.com/mysql
>
> there is the subscribe box on the right side... use that.   they are a
> helpful bunch over there.
>
> --
>
> Steve Staples
> Web Application Developer
> MNSi (Managed Network Systems Inc.)
> 519.258.2333 x8414
> http://www.mnsi.net
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Try using LOCATE instead of the FIELD function

$q = "SELECT race_winner,count(race_date) as wins,
substr(race_winner,LOCATE(' ',race_winner)) as last_name


-- 

Bastien

Cat, the other other white meat

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux