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

SQLize | PHPize | SQLtest

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

A A A
Login    Share code      Blog   FAQ
Copy Format Clear
CREATE TABLE counter ( site varchar(64) primary key, count int, updated_at timestamp ); INSERT INTO counter ( site, count, updated_at ) VALUES ('Site 1', 1, strftime('%Y-%m-%d %H-%M-%S','now')); SELECT * FROM counter; INSERT INTO counter ( site, count, updated_at ) VALUES ('Site 1', 1, strftime('%Y-%m-%d %H-%M-%S','now')) ON CONFLICT(site) DO UPDATE SET count = count + 1; SELECT * FROM counter;

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

Copy Clear