<?php

/**
 * SQL Dialect for MySQL
 *
 * @version DR1.6
 */
class MySQLDialect extends SQL92Dialect {



	public function getTrue() {
		return '1';
	}



	public function getFalse() {
		return '0';
	}



	public function getQuotes() {
		return '`';
	}



	public function getSQL($sql, $order, $descending, $offset, $limit) {
		if ($order) {
			$asc = $descending ? 'DESC' : 'ASC';
			$sql .= " ORDER BY $order $asc";
		}
		if ($limit and $offset) {
			$sql .= " LIMIT $offset, $limit";
		} elseif ($limit) {
			$sql .= " LIMIT $limit";
		}
		return $sql;
	}



} // class MySQLDialect

?>