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
-- create a table CREATE TABLE students ( id INTEGER PRIMARY KEY, name TEXT NOT NULL, gender TEXT NOT NULL ); -- insert some values INSERT INTO students VALUES (1, 'Ryan', 'M'); INSERT INTO students VALUES (2, 'Joanna', 'F'); -- fetch some values SELECT * FROM students WHERE gender = 'F';

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

Copy Clear
Copy Format Clear
<?php $res = mysqli_query($mysqli, "SELECT * FROM students WHERE gender = 'F'"); $res = mysqli_fetch_array($res); echo $res[1]; ?>
Copy Clear