如何更改标识符user_id的名称? 变体在上面不起作用。 或者是否有选项sql。
id|user_id|name
----------------------
15| 2 |testreg
----------------------
18| 1 |Cheburashka
----------------------
6 | 2 |testreg
----------------------
19| 1 |Cheburashka
----------------------
20| 1 |Cheburashka
public function eBL() {
$link_ebl = $this->config->address."?view=editprofile";
$user_id = $this->data["id"];
$name = $this->data["login"];
if ($name == "") return $this->returnMessage("EMPTY_FIELD", $link_ebl);
$result = $this->article->setName($user_id, $name);
if ($result) return $this->returnPageMessage("SUCCESS_LOGIN", $this->config->address."?view=message");
else return $this->unknownError($link_ebl);
}
public function setName($user_id, $name){
return $this->setFieldOnID("user_id", "name", $name);
}
答案 0 :(得分:0)
如果要更改列名,则应使用alter table(假设要更改名称的列为INT)
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<!-- To change the popup menu and app text color -->
<item name="android:textColor">@color/colorPrimary</item>
<!-- To change the background of options menu-->
<item name="android:itemBackground">@color/skyBlue</item>
</style>