mysql - true/false issue in php
one text
Solution:
Your enum consists of two strings 'true' and 'false'.
But in code you pass booleans true and false that later on includes conversion magic.
So you should store it as strings too:
'stripe' => [
'enable' => $Status ? 'true' : 'false',
'testMode' => $Mode ? 'true' : 'false', //test mode or live mode (boolean, true or false)
],
I do not suggest using Enum for such true/false values as you will have issues later on. Most common practice is to use it as TINYINT(1) and passing boolean true/false values - it will save database space and will not bring type conversion errors when you try to do $row['testMode'] == true