gyro/core/model/drivers/mysql/sqlbuilder/dbsqlbuilder.delete.mysql.cls.php
Go to the documentation of this file.00001 <?php 00002 /** 00003 * Delete queries for MySQL 00004 * 00005 * @author Gerd Riesselmann 00006 * @ingroup Model 00007 */ 00008 class DBSqlBuilderDeleteMysql extends DBSqlBuilderDelete { 00009 /** 00010 * Return SQL fragment 00011 * 00012 * @return string 00013 */ 00014 public function get_sql() { 00015 $template = $this->get_sql_template(); 00016 $vars = $this->get_substitutes(); 00017 if (empty($vars['%where']) && empty($vars['%order_by']) && empty($vars['%limit'])) { 00018 $template = 'TRUNCATE %!table'; 00019 } 00020 return $this->substitute_template($template, $vars); 00021 } 00022 }