You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an enhancement request to implement conditional bindings.
This feature would consider the parameter value; if found to be null, would throw the binding away, if not, would attach the defined arbitrary SQL to the relevant portion of the SQL.
A suggested solution to this may be as follows:
<?php$arr_records = $obj_db->prepare("SELECT * FROM myTable WHERE col1= ?col1 AND col2 = ?col2 ?_cond_col3 order by xxx")
->bindIntIfNotNull('cond_col3', "AND col3 = ?", $col3)
->bindInt('col1', $col1)
->bindInt('col2', $col2)
->fetchAll();
The text was updated successfully, but these errors were encountered:
This is an enhancement request to implement conditional bindings.
This feature would consider the parameter value; if found to be null, would throw the binding away, if not, would attach the defined arbitrary SQL to the relevant portion of the SQL.
A suggested solution to this may be as follows:
The text was updated successfully, but these errors were encountered: