本文整理匯總了PHP中ADODB_DataDict::DropColumnSQL方法的典型用法代碼示例。如果您正苦於以下問題:PHP ADODB_DataDict::DropColumnSQL方法的具體用法?PHP ADODB_DataDict::DropColumnSQL怎麽用?PHP ADODB_DataDict::DropColumnSQL使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ADODB_DataDict
的用法示例。
在下文中一共展示了ADODB_DataDict::DropColumnSQL方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: DropColumnSQL
/**
* Drop one column
*
* Postgres < 7.3 can't do that on it's own, you need to supply the complete defintion of the new table,
* to allow, recreating the table and copying the content over to the new table
* @param string $tabname table-name
* @param string $flds column-name and type for the changed column
* @param string $tableflds complete defintion of the new table, eg. for postgres, default ''
* @param array/ $tableoptions options for the new table see CreateTableSQL, default ''
* @return array with SQL strings
*/
function DropColumnSQL($tabname, $flds, $tableflds = '', $tableoptions = '')
{
$has_drop_column = 7.3 <= (double) @$this->serverInfo['version'];
if (!$has_drop_column && !$tableflds) {
if ($this->debug) {
ADOConnection::outp("DropColumnSQL needs complete table-definiton for PostgreSQL < 7.3");
}
return array();
}
if ($has_drop_column) {
return ADODB_DataDict::DropColumnSQL($tabname, $flds);
}
return $this->_recreate_copy_table($tabname, $flds, $tableflds, $tableoptions);
}
示例2: DropColumnSQL
function DropColumnSQL($tabname, $flds)
{
if ($this->debug) {
ADOConnection::outp("DropColumnSQL only works with PostgreSQL 7.3+");
}
return ADODB_DataDict::DropColumnSQL($tabname, $flds) . "/* only works for PostgreSQL 7.3+ */";
}