View Single Post
Old 05-19-2009, 07:32 AM   #27 (permalink)
TheOnly92
The Contributor
 
Join Date: Mar 2009
Posts: 49
Thanks: 0
TheOnly92 is on a distinguished road
Default

What I want to say is I really dislike SQLite, it keeps giving me undefined method eventhough it's documented in PHP's site.

Code:
Call to undefined method SQLiteDatabase::escapeString()
Can anyone also point out my mistake? I'm using PHP 5.2.9 under FastCGI

Code:
$DBHandle = new SQLiteDatabase($this->DBFile);
		if (!$DBHandle) {
			die("Could not access instance database");
		}
		$this->DBHandle = $DBHandle;
$this->DBHandle->query('CREATE TABLE instances (
			id varchar(255),
			Created int(11),
			Name varchar(255),
			Link varchar(255),
			Status varchar(50),
			Size varchar(255),
			Speed varchar(255),
			Received varchar(255),
			Unique varchar(12)
		);');
$query = "INSERT INTO instances (id, Created, Name, Link, Status, Size, Speed, Received, Unique) VALUES
				('$id',".time().",'".$this->DBHandle->escapeString($filename)."','".$this->DBHandle->escapeString($link)."',".
				"'$status','$size','$speed','$received','$unique')";
			$this->DBHandle->query($query);
TheOnly92 is offline  
Reply With Quote