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
show tables;

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

Copy Clear
Copy Format Clear
<?php $mysqli->query("create table table_name (col1 varchar(1), col2 int)"); $mysqli->query("insert into table_name values ('a',1),('b',2),('c',3)"); $data = ['a',1,'b',2]; $bind_param_types = 'sisi'; $kweerie = $mysqli->query("SELECT * FROM table_name"); while ($object = mysqli_fetch_assoc($kweerie)) { echo '<pre>' , print_r($object) , '</pre>'; } exit(); $stmt = $mysqli->prepare("DELETE FROM table_name WHERE (col1, col2) IN ((?, ?),(?, ?))"); $stmt->bind_param($bind_param_types, ...$data); $stmt->execute(); echo $mysqli->affected_rows;
Copy Clear