| Source for file Mysqli.phpDocumentation is available at Mysqli.php 
 * Copyright (c) 2008 - 2009 PHPLinq * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU * Lesser General Public License for more details. * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA * @package    PHPLinq_Adapter * @copyright  Copyright (c) 2008 - 2009 PHPLinq (http://www.codeplex.com/PHPLinq) * @license    http://www.gnu.org/licenses/lgpl.txt    LGPL * @version    0.4.0, 2009-01-27/** PHPLinq_Adapter_Abstract */require_once 'PHPLinq/Adapter/Abstract.php'; * @package    PHPLinq_Adapter * @copyright  Copyright (c) 2008 - 2009 PHPLinq (http://www.codeplex.com/PHPLinq)     * @param Zend_Db_Adapter_Abstract $adapter     public function __construct(Zend_Db_Adapter_Abstract $adapter = null) {     * @param string $operator      * Return ASCII value of character     * @param string $string A character    public function ord($string) {        return 'ASCII(' . $string . ')';     * Return a specific character     * @param int $string The ascii code    public function chr($ascii) {        return 'CHAR(' . $string . ')';     * Return part of a string    public function substr($string, $start, $length = '') {            return 'SUBSTRING(' . $string . ', ' . $start . ')';        return 'SUBSTRING(' . $string . ', ' . $start . ', ' . $length . ')';    public function strlen($string) {        return 'CHAR_LENGTH(' . $string . ')';     * Count elements in an array, or properties in an object    public function count($var) {         return 'COUNT(' . $var . ')';    public function max($values) {         return 'MAX(' . $values . ')';    public function min($values) {         return 'MIN(' . $values . ')';    public function abs($number) {        return 'ABS(' . $number . ')';     * Make a string lowercase        return 'LOWER(' . $str . ')';     * Make a string uppercase        return 'UPPER(' . $str . ')';     * Strip whitespace (or other characters) from the beginning of a string    public function ltrim($str) {        return 'LTRIM(' . $str . ')';     * Generate a random integer     * Replace all occurrences of the search string with the replacement string    public function str_replace($search, $replace, $subject) {        return 'REPLACE(' . $subject . ', ' . $search . ', ' . $replace . ')';    public function round($val, $precision = 0) {        return 'ROUND(' . $val . ', ' . $precision . ')';     * Strip whitespace (or other characters) from the end of a string    public function rtrim($str) {        return 'RTRIM(' . $str . ')';     * Strip whitespace (or other characters) from the beginning and end of a string    public function trim($str) {        return 'TRIM(' . $str . ')';     * Find position of first occurrence of a string     * @param string $haystack     public function strpos($haystack, $needle, $offset = 0) {        return 'LOCATE(' . $needle . ', ' . $haystack . ',  ' . $offset . ')';     * Find position of first occurrence of a case-insensitive string     * @param string $haystack     public function stripos($haystack, $needle, $offset = 0) {     * Make a string's first character lowercase     * Make a string's first character uppercase     * Calculate the md5 hash of a string     * @param boolean $raw_output     public function md5($str, $raw_output = false) {        return 'MD5(' . $str . ')';     * Calculate the sha1 hash of a string     * @param boolean $raw_output     public function sha1($str, $raw_output = false) {        return 'SHA1(' . $str . ')';     * Calculate the soundex key of a string        return 'SOUNDEX(' . $str . ')';     * Quote string with slashes        return 'QUOTE(' . $str . ')';        return 'REPEAT(' . $input . ', ' . $multiplier . ')'; |