Location: PHPKode > projects > Anchor CMS > anchor-cms-0.8/upgrade/libraries/schema.php
<?php

class Schema {

	public $connection;

	public function __construct($connection) {
		$this->connection = $connection;
	}

	public function has($table, $column = '', $value = '') {
		if($value) {
			$sql = "select * from `" . $table . "` where `" . $column . "` = '" . $value . "'";
		} elseif($column) {
			$sql = "show columns from `" . $table . "` like '" . $column . "'";
		} else {
			$sql = "show tables like `" . $table . "`";
		}

		return $this->connection->query($sql);
	}

}
Return current item: Anchor CMS