Hi! Could we please enable some services and cookies to improve your experience and our website?

PHPize Online / SQLize Online  /  SQLtest Online

A A A
Login    Share code      Blog   FAQ

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

Copy Format Clear

Stuck with a problem? Got Error? Ask AI support!

Copy Clear
Copy Format Clear
<?php $mysqli->query('DROP PROCEDURE IF EXISTS gh12107'); $sql = <<<SQL CREATE PROCEDURE `gh12107`() BEGIN SELECT "hello world"; END; SQL; $mysqli->query($sql); echo "Start or run 1\n"; $stmt = $mysqli->prepare("call `gh12107`()"); $stmt->execute(); $stmt->bind_result($output); var_dump($stmt->fetch()); var_dump($output); unset($output); echo "End of run 1\n"; echo "Start or run 2\n"; $stmt->execute(); $stmt->bind_result($output); var_dump($stmt->fetch()); var_dump($output); echo "End of run 2\n"; ?>
Copy Clear