PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
SELECT * from dual union
Copy Clear
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 Clear