Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > MySQL
|
MySQL General discussion about the MySQL database.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the MySQL section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 15th, 2006, 05:03 PM
Friend of Wrox
 
Join Date: Mar 2005
Posts: 264
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to output part of feild using mysql

Hi all. i got a huge list of mp3 that they are in diffrent folders. I put all the songs infor in mysql database in a table called files. I want a query db that output foldernames for me .The folder name is part of feiled called filename in files table. The value of filename is like this stored in db :

http://localhost/wimpy5recursive/mp3s/album1/song1.mp3
http://localhost/wimpy5recursive/mp3s/album2/song4.mp3
where the bold part is the foldername. i want to print folder name.Note:mp3s is the root folder for mp3s.The whole point is to list all folders name and link to page that holds songs inside those folders.

 Furthermore, i want a query all feilds info for songs in each given folder.What i mean is that for each folder it lists all songs info iside that folder.I want to be able to tell the query what folder i want to list its song.Thanks
 
Old March 6th, 2006, 05:48 PM
Friend of Wrox
 
Join Date: Dec 2003
Posts: 488
Thanks: 0
Thanked 3 Times in 3 Posts
Default

erm ...

SELECT filename WHERE filename LIKE 'http://localhost/wimpy5recursive/mp3s/album1/%'

any good?

--
Don't Stand on your head - you'll get footprints in your hair
                                           http://charlieharvey.org.uk
                                              http://charlieharvey.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Data access page help. passing feild values [email protected] Access 0 November 26th, 2006 05:29 PM
output the number of rows in my mysql db crmpicco Classic ASP Databases 1 January 28th, 2005 10:26 AM
The difficult part k0023382 Access 1 October 8th, 2004 03:37 AM
Auto Complete Feild qazi_nomi Access 1 October 4th, 2004 09:11 AM
How to increase the size of a text feild qazi_nomi Access 1 June 15th, 2004 03:30 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.