有些東西跟mysql跟mssql很不一樣,
撞牆撞了一堆
先來個 官方教學
"update item set ror_pot="& A1 &" where item_no ='"&TRIM(A1)&"'"
update item set ror_pot = 1 where item_no=’123456’
update item set ror_pot = where item_no=’123456’
=IF(NOT(ISBLANK(R9)),"update item set ror_pot="& R9&" where item_no ='"&TRIM(A9)&"'","")
電子表單撈出來的程式,
是jsp,但今天要針對表格作排列的話。
一種就是針對資料排列,排完後就直接列印啥都不用管。
看了一下JSP的排列方式,要麻用 treemap 再不然就是用 Vector 然後我都弄不出來。
最後只好改用前端的方式作。
於是 Sort a Table
就這樣直接套用了。
<script>
//根據單號排序
var table, rows, switching, i, x, y, shouldSwitch;
table = document.getElementById("myTable");
switching = true;
while (switching) {
switching = false;
rows = table.getElementsByTagName("TR");
for (i = 1; i < (rows.length - 1); i++) {
shouldSwitch = false;
x = rows[i].getElementsByTagName("TD")[1];
y = rows[i + 1].getElementsByTagName("TD")[1];
if (x.innerHTML.toLowerCase() > y.innerHTML.toLowerCase()) {
shouldSwitch = true;
break;
}
}
if (shouldSwitch) {
rows[i].parentNode.insertBefore(rows[i + 1], rows[i]);
switching = true;
}
//console.log('loop');
}
</script>
x = rows[i].getElementsByTagName("TD")[1];
後面的 [1] 是代表table的第二個column,表格是從0開始
table ID 是 myTable
標題記得改用TH
Heroku login 登入
git add . 加入版更到git
git commit –m “備註”
git push heroku master 發佈
裝了那麼多次,第一次碰到打開看資料表
沒有註解,要把全部欄位背起來太困難了。
所幸,萬能的google,找到這篇
Viewing table data types, comments, keys, and indexes In the Object Layout view, you can see a description for each column, as well as icons for keys and indexes. If you do not see this, right-click a blank area inside the view and select Show Comments, Show Referential Integrity, and then Show Index Keys from the pop-up menu. If you select Show Datatypes, you also see the data type for each column in the selected tables.
簡單說就是,在空白的地方按右鍵,顯示comments就好了
人生終於從黑白跑到彩色
Line Notify(API) | Line BOT(Messaging API) |
無法互動 | 可互動 |
免費 | 使用API要錢(連結) 可申請測試 |