cvs: pear /MDB2/MDB2/Driver/Manager mssql.php

From: Date: Mon, 21 Aug 2006 16:12:34 +0000
Subject: cvs: pear /MDB2/MDB2/Driver/Manager mssql.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-41792@lists.php.net to get a copy of this message
nrf Mon Aug 21 16:12:34 2006 UTC Modified files: /pear/MDB2/MDB2/Driver/Manager mssql.php Log: - added dropIndex() http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/Manager/mssql.php?r1=1.77&r2=1.78&diff_format=u Index: pear/MDB2/MDB2/Driver/Manager/mssql.php diff -u pear/MDB2/MDB2/Driver/Manager/mssql.php:1.77 pear/MDB2/MDB2/Driver/Manager/mssql.php:1.78 --- pear/MDB2/MDB2/Driver/Manager/mssql.php:1.77 Sat Aug 19 06:42:04 2006 +++ pear/MDB2/MDB2/Driver/Manager/mssql.php Mon Aug 21 16:12:34 2006 @@ -42,7 +42,7 @@ // | Author: Frank M. Kromann <frank@kromann.info> | // +----------------------------------------------------------------------+ // -// $Id: mssql.php,v 1.77 2006/08/19 06:42:04 lsmith Exp $ +// $Id: mssql.php,v 1.78 2006/08/21 16:12:34 nrf Exp $ // require_once 'MDB2/Driver/Manager/Common.php'; @@ -440,6 +440,29 @@ return $result; } // }}} + // {{{ dropIndex() + + /** + * drop existing index + * + * @param string $table name of table that should be used in method + * @param string $name name of the index to be dropped + * @return mixed MDB2_OK on success, a MDB2 error on failure + * @access public + */ + function dropIndex($table, $name) + { + $db =& $this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + $table = $db->quoteIdentifier($table, true); + $name = $db->quoteIdentifier($db->getIndexName($name), true); + return $db->exec("DROP INDEX $table.$name"); + } + + // }}} // {{{ createSequence() /** * create sequence

« previous php.pear.cvs (#41792) next »