Home > Zkilleman_Db_Adapter_Drizzle

Zkilleman_Db_Adapter_Drizzle

Zkilleman_Db_Adapter_Drizzle is a project mainly written in PHP, based on the BSD-3-Clause license.

A Zend Db Adapter for the Drizzle php extension

###############################

GENERAL INFORMATION

###############################

Zkilleman_Db_Adapter_Drizzle is a project that aims to provide a Zend Framework compatible database adapter for the Drizzle RDBMS.

#######################

KNOWN ISSUES

#######################

I've experienced segfaults when using the Drizzle PHP Extension in combination with APC. The project (Drizzle PHP Extension) is currently not being actively maintained and you might be better off using the mysqli or pdo_mysql extension for now.

##########################################

RELATED PROJECTS / DEPENDENCIES

##########################################

Drizzle, the community-driven open source RDBMS: http://www.drizzle.org/ Drizzle PHP Extension: https://launchpad.net/drizzle-php-ext Zend Framework: http://framework.zend.com/

######################

DISCLAIMER

######################

This piece of software is in a very early stage of development and is probably not suitable for use in production environments. See LICENSE.txt for information about warranty.

##########################

DIRECTORY TREE

##########################

Zkilleman/ -- Db |-- Adapter | |-- Drizzle | |-- Exception.php | -- Drizzle.php -- Statement |-- Drizzle | -- Exception.php -- Drizzle.php

5 directories, 4 files

#########################

EXAMPLE USAGE

#########################

<?php

// Connect to Drizzle require_once 'Zkilleman/Db/Adapter/Drizzle.php'; $adapter = new Zkilleman_Db_Adapter_Drizzle(array( 'dbname' => 'a_database', 'username' => 'a_user', 'password' => 'a_secret' ));

// Create a table $adapter->query( 'CREATE TABLE IF NOT EXISTS a_table ( an_id INT(11) NOT NULL AUTO_INCREMENT, a_column VARCHAR(255) NOT NULL DEFAULT "", PRIMARY KEY (an_id) )' );

// Insert some data $adapter->query('INSERT INTO a_table (a_column) VALUES ("a value")'); echo sprintf('Row with id %s inserted
', $adapter->lastInsertId());

// Read it $stmt = $adapter->select()->from('a_table')->order('an_id DESC')->query(); while ($row = $stmt->fetch(Zend_Db::FETCH_OBJ)) { echo sprintf('%s: %s.
', $row->an_id, $row->a_column); }