ListArray=[1,2,3];
Stack::where('columnA', $ListArray) - > toSQL;
I checked the contents of SQL as and found that where(`columnA`=?)
.
I'd like to check if where
works for the elements of the array, but is there a good way?
If you use getBindings
instead of toSql
as shown below, you will be able to confirm the binding.
"Also, it may be a code transfer error, but it seems that ""$
"" before ""ListArray
"" is missing."
$ListArray=[1,2,3];
Stack::where('columnA', $ListArray)->getBindings();
© 2024 OneMinuteCode. All rights reserved.