本文整理汇总了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+ */";
}