# Splitstring in mysql select statement

**URL:** <https://forum.kirupa.com/t/splitstring-in-mysql-select-statement/245117>\
**Category:** Uncategorized\
**Created:** [November 26, 2007, 4:53pm UTC](https://forum.kirupa.com/t/splitstring-in-mysql-select-statement/245117 "2007-11-26T16:53:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoshuaJonah](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/joshuajonah/32/1775_2.png) [@JoshuaJonah](https://forum.kirupa.com/u/JoshuaJonah)\
**Post date:** [November 26, 2007, 4:53pm UTC](https://forum.kirupa.com/t/splitstring-in-mysql-select-statement/245117/1 "2007-11-26T16:53:21Z")

</div>

ok, im having a little issue putting together a select statement.

What im tryng to do is pull one field, and also any extras if they are in this fields ‘sub’ column.

so that when i open a page, it also pulls the name of any sub pages that may be contained.

kinda hard to explain.

## tablename = sections

## id | name | sub | body text | date … etc whatever.

1 | home | 3,4  
2 | contact | 1  
3 | stats | 1  
4 | sales | 2

ok, so say i want to open the ‘home’ page, i want to also pull anything in the ‘sub’ field, so i will also be pulling the ‘stats’ and ‘sales’ page so that i may build a sub menu on the ‘home’ page of these items.

Thats about as well as i can explain it.

im looking at this page: [http://forums.mysql.com/read.php?60,78776,78776](http://forums.mysql.com/read.php?60,78776,78776)  
but it’s not really sinking in:D
