# How to retrieve segment size

**URL:** https://forum.mautic.org/t/how-to-retrieve-segment-size/15525
**Category:** General Discussion
**Created:** [August 5, 2020, 12:54pm UTC](https://forum.mautic.org/t/how-to-retrieve-segment-size/15525 "2020-08-05T12:54:27Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![fjeldberg](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/fjeldberg/32/613_2.png) [@fjeldberg](https://forum.mautic.org/u/fjeldberg)
#### Post date: [August 5, 2020, 12:54pm UTC](https://forum.mautic.org/t/how-to-retrieve-segment-size/15525/1 "2020-08-05T12:54:27Z")

</div>

I want to create a petition form, where a bar will fill up as people sign, however i need the current segment size for that. Is it possible to get the size of a segment from Mautic with PHP, to display in WodPress?

---

<div class="post-metadata">

### Author: ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)
#### Post date: [August 5, 2020, 4:59pm UTC](https://forum.mautic.org/t/how-to-retrieve-segment-size/15525/2 "2020-08-05T16:59:05Z")

</div>

you can do a mysql query using php to get the size

do a select on lead\_lists\_leads and the field is leadlist\_id to equal your segment number
