<?php
// uncomment the block below and // call this script if you lost the database file // (visit http://locationofthis/update.php) /* db->query("BEGIN; CREATE TABLE boxes ( text CHAR(140), x INTEGER(5), y INTEGER(5) ); COMMIT;"); */
function addBox(db) { string)); if (strlen(y = rand(20,600); db->query("BEGIN; INSERT INTO boxes (text,x,y) VALUES ('".x."','".
function deleteBox(id, id == "all") db->query("DELETE FROM boxes WHERE rowid = '
function update(db) { result = query, SQLITE_ASSOC); echo json_encode(
function move(x, id, db->query("UPDATE boxes set x='y' WHERE rowid='
switch (_POST["action"]) { case "new": addBox(db); update(_POST["boxid"], _POST["x"], _POST["id"], db); break; case "update": update(
(C) Æliens 04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.