Skip to content

Instantly share code, notes, and snippets.

View MarcTowler's full-sized avatar
💭
Working on Twitch and Discord bots

Marc Towler MarcTowler

💭
Working on Twitch and Discord bots
View GitHub Profile
//First file - has all the database bits in and extends SQLiteOpenHelper
public Cursor queryOne(String name) {
SQLiteDatabase db = this.getWritableDatabase();
Cursor res = db.rawQuery("SELECT type1, type2 FROM Pokemon WHERE name = ?",
new String[]{name});
return res;
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>
{site title}
</title>
<!--<link rel="shortcut icon" href="{pathToApp}/images/fav.ico" />-->
<link rel="stylesheet" href="{pathToApp}/views/main.css" type="text/css" media="screen" />
</head>
<?php
class Registry {
/**
* @var array The store for all objects
*/
static private $store = array();
/**