Is it possible to perform a specific PHP function on data that is being returned by a database query, at the very moment this query is still running?
Let's say we are in some class and we have the following pseudo SQL which should return a couple of rows:
$results = $this->db->query("SELECT PHP_function(column), column 2 FROM table")->fetchAll(PDO::FETCH_ASSOC);
PHP_function could be json_decode for example.
Or is this not possible and would it require an additional loop on the results in order to do such a thing?
return php_function($row['column']);or even not returning, but using it somewhere inside the function