Closed ha-ni-cc closed 5 years ago
Do not open a new duplicated issue from #720. You can discuss on there.
I tested this case again with another environment, finally reproduced the problem.
I will test more and figure out for the EMULATE_PREPARES option and find a way to fix it.
This debug affected many application scenarios,so I hope the next version can repair it! @catfan
It just because you set the ATTR_EMULATE_PREPARES
to false. The default value of this option is true.
There is no problem using the default value. We do not recommend to change those PDO option. It may cause some unexpected problem.
If you just want to convert the type of fetched value, Medoo has provided a way to convert it.
For this case, it need to test other PDO option together for compatible reason for the next.
This has been fixed on a951846f9bfe93419d40700d9fbefde5c9b10259.
Medoo version 1.5.7 Mysql version 5.7
` $medoo = new Medoo([
`
has() method always return FALSE.
but I modified the function, it could work well.
` public function has($table, $join, $where = null) { $map = []; $column = null;
`
Old code:
return $result === '1' || $result === true;
To this:
return $result === 1 || $result === '1' || $result === true;
Because I setting ATTR_EMULATE_PREPARES to FALSE, the COLUMN return value's type is integer. but you strict judge with string and boolean. So it always return FALSE.
PLEASE TO FIXED IT , THANKS!