# can't get data from mysql

**URL:** <https://community.ofelia.com/t/cant-get-data-from-mysql/8848>\
**Category:** Q&A\
**Created:** [8 November 2017 22:43 UTC](https://community.ofelia.com/t/cant-get-data-from-mysql/8848 "2017-11-08T22:43:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![afefmdimagh](https://avatars.discourse-cdn.com/v4/letter/a/258eb7/32.png) [@afefmdimagh](https://community.ofelia.com/u/afefmdimagh)\
**Post date:** [8 November 2017 22:43 UTC](https://community.ofelia.com/t/cant-get-data-from-mysql/8848/1 "2017-11-08T22:43:29Z")

</div>

hello , i m using bonitasoft 6.5.1 community and Phpmyadmin

I want to Search the Database based on Values provided in the Search form created in Bonita.  
My query to search based on the variable value is  
select \* from clients where ‘id\_client’ = ‘${variable}’

this request is feasible in phpmyadmin and the searched data is displayed according to the value provided in the Search query but using the connector in bonita it does not work .

thanks

---

<div class="post-metadata">

**Author:** ![vitiellom](https://avatars.discourse-cdn.com/v4/letter/v/dfb087/32.png) [@vitiellom](https://community.ofelia.com/u/vitiellom)\
**Post date:** [9 November 2017 10:02 UTC](https://community.ofelia.com/t/cant-get-data-from-mysql/8848/2 "2017-11-09T10:02:50Z")

</div>

Hi,

how does the script in your connector looks like? You would probably need something like

```
def script = "select * from clients where id_client = " + xyz;

```

where xyz is the name of the variable from the UI (should be available in the top-right dropdown list in the script window).

Best

---

<div class="post-metadata">

**Author:** ![gpscruise](https://avatars.discourse-cdn.com/v4/letter/g/7ab992/32.png) [@gpscruise](https://community.ofelia.com/u/gpscruise)\
**Post date:** [9 November 2017 14:55 UTC](https://community.ofelia.com/t/cant-get-data-from-mysql/8848/3 "2017-11-09T14:55:54Z")

</div>

I got it working once and made a video. Its not perfect…

[link](https://www.youtube.com/watch?v=a3v0HmO0jdk&t=6s)
