Sponsored by NuSphere - PHP Software for PHP Application Developers - On Sale This Week for $100



Go Back   PHP-Editors > Linux, Apache, MySQL > MySQL Help

MySQL Help Post any question relating to MySQL here and hopefully someone can help

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 2006-07-30, 10:09 PM
Junior Member
 
Join Date: Jul 2006
Posts: 1
arfinator is on a distinguished road
Default Distinct Substring Query

Hello,

I have a large list of songs and artists and I am creating a playlist. At the top, I have the user select a letter which will then direct them to artists that start with that letter.

The problem I am running into is for artists that start with a number should be going under a separate category 0-9 and '. But instead they are going as individual numbers in the list.

The query I am running for this is:
Code:
SELECT distinct substr(artist, 1,1) as browse FROM songlist WHERE songtype = "S" or songtype = "C" ORDER by artist asc
I have tried adding into the where clause AND songlist.browse not like '1%') etc.

My question is, can I run a query and exclude numbers from returning in the result?

Does anyone have any suggestions that I could use to accomplish this?

Thank you in advance to anyone who may be of help.

Hess Smith
Reply With Quote
  #2 (permalink)  
Old 2006-10-07, 12:23 PM
Member
 
Join Date: Jun 2006
Posts: 55
flann is on a distinguished road
Default

Quote:
Originally Posted by arfinator View Post

My question is, can I run a query and exclude numbers from returning in the result?
where field <> whatever
__________________
flann
Free Mortgage Calculator | Debt Free
Reply With Quote
Must read Review for Serious PHP Developers


NuSphere PhpED 5.5 : The Staff of php-editors.com recently spent a few days working with NuSphere PhpED 5.5 (a popular PHP IDE) and NuCoder 2.0 (a PHP Encoding Utility), read up on all the details.

Sponsored Links
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 11:04 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.