日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程语言 > php >内容正文

php

php txtsql 说明,PHP学习笔记(2)txtSQL文档错误

發(fā)布時間:2025/3/12 php 21 豆豆
生活随笔 收集整理的這篇文章主要介紹了 php txtsql 说明,PHP学习笔记(2)txtSQL文档错误 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

PHP學(xué)習(xí)筆記(2)txtSQL文檔錯誤

次閱讀

在使用txtSQL的過程中,發(fā)現(xiàn)一處幫助文檔錯誤。

在使用altertable命令改變表名稱時,發(fā)現(xiàn)如果按照幫助文檔所說,使用如下代碼無法改變表的名稱:

$sql->altertable(array('db'=>$db_name,'table'=>$table_name,'name'=>$table_name,'action'=>'rename table','value'=>array('name'=>$table_rename_name))

后來查閱范例程序,才發(fā)現(xiàn)如果修改表名必須使用如下代碼才可以,也就是說,第三個參數(shù)“name”的值應(yīng)該是新的表名。不需要設(shè)定第五個參數(shù)“value”:

$sql->altertable(array('db'=>$db_name,'table'=>$table_name,'name'=>$table_rename_name,'action'=>'rename table')

以下是幫助文檔中的描述:

altertable

Purpose: To alter a txtSQL-table's column definitions txtSQL >= 2.2.2 RC2

void altertable ( array ('table' => $table, 'action' => $action, 'name' => $column, 'values' => $values [, 'after' => $afterColumn [, 'db' => $db]]) )

This function will alter a txtSQL-$table's column defintions. It will only work with the specified column, which is $column. The $action can be either

insert- Inserts a new column, $column, and if specified, after the column $afterColumn

modify- Modifies an existing $column

drop- Drops an existing $column

rename col- Renames a $column. Expects array('name' => $newcolname) in the $values

//此句錯誤

rename table- Renames a $table. Expects array('name' => $newTableName) in the $values

addkey- Sets $column as the primary key ( must be integer and auto_increment ). Expects array('name' => $colName) in the $values

dropkey- Does opposite of 'addkey'

The $values element is an array containing information about the column, it must be in the following format

array( [$colType => $value]... ) unless otherwise noted above

總結(jié)

以上是生活随笔為你收集整理的php txtsql 说明,PHP学习笔记(2)txtSQL文档错误的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。