PHPize Online / SQLize Online

A A A
Share   Donate   Blog   Popular
Copy Format Clear
SELECT * from dual union
Copy
Copy Format Clear
<?php $query = "select ? a, ? b, ? c from dual union select 11 a, 12 b, 13 c"; $stmt = $mysqli->prepare($query); $stmt->bind_param("sss", ...[1,2,3]); $stmt->execute(); $stmt->store_result(); $result = ['a','b','c']; $stmt->bind_result(...$result); $output = array(); while ($stmt->fetch()) { $output = array_merge($output, $result); } var_dump($output);
Show:  
Copy