# Cakephp 3: find('list') isn't returning records on specific query

**URL:** <https://discourse.cakephp.org/t/cakephp-3-find-list-isnt-returning-records-on-specific-query/6924>\
**Category:** Need Help\
**Created:** [November 25, 2019, 5:18pm UTC](https://discourse.cakephp.org/t/cakephp-3-find-list-isnt-returning-records-on-specific-query/6924 "2019-11-25T17:18:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ar1983](https://avatars.discourse-cdn.com/v4/letter/a/57b2e6/32.png) [@ar1983](https://discourse.cakephp.org/u/ar1983)\
**Post date:** [November 25, 2019, 5:18pm UTC](https://discourse.cakephp.org/t/cakephp-3-find-list-isnt-returning-records-on-specific-query/6924/1 "2019-11-25T17:18:15Z")

</div>

I’m having issue with find(‘list’) which is not returning rows on a specific values. But, when I’m executing the same query in SQLYog GUI it is actually returning rows.

Screenshot of cakePHP Debug kit SQL Log Query:

 ![2019-11-25_21-57-29](https://canada1.discourse-cdn.com/flex029/uploads/cakephp/original/2X/e/efc303b1dc1ccd3dd4a8eb7163b61a2bc70f905d.jpeg)

Screenshot of records when I execute this query in SQLYog GUI: ![2019-11-25_21-55-12](https://canada1.discourse-cdn.com/flex029/uploads/cakephp/original/2X/c/cf350ac2dbf8465c6c225a8c5e9fd39aa656a6de.jpeg)

See below code which I’m using in a controller:  
$proposal\_part\_length = number\_format($filterForm[‘proposal\_part\_length’], 4, ‘.’, ‘’);  
$proposal\_part\_width = number\_format($filterForm[‘proposal\_part\_width’], 4, ‘.’, ‘’);

```
$this->loadModel('ProposalParts');
$parts = array();

$parts = $this->ProposalParts
    ->find('list', [
        'keyField' => 'id',
        'valueField' => 'proposal_id'
    ])
    ->where(['ProposalParts.length' => $proposal_part_length, 'ProposalParts.width' => $proposal_part_width])
    ->distinct(['ProposalParts.proposal_id'])
    ->toArray();

```

Both fields in where clause datatypes are “float(11,4)”. I’ve tried removing “number\_format” function but still no records found with that QUERY but system is showing up records, if I change “length” and “width” values, like: “5”, “1” or “5.0000”, “1.0000”.

Does anyone have suggestion what’s wrong with this?

If you’ve any questions let me know.
