Re: fetchQueryCallback
Reply #4 –
I'm a bit dumb at times, I didn't get the message right, now I do.
Yep, I added the null default more or less to mimic the jQuery behaviour: if there is a callback call it, otherwise just do what you are supposed to do with it. The cheap polimorphism you can achieve with PHP.
ETA: a potential case (as of now, not existing):
if (condition) {
$query = 'SELECT * FROM something LEFT JOIN somethingelse';
$callback = function ($vals) {...};
}
else {
$query = 'SELECT * FROM something';
$callback = null;
}
$results = $db->fetchQueryCallback($query, $values, $callback);