1 / 5

10/05 號專題報告

10/05 號專題報告. Web 網頁遊戲 曾建瑋. 資料庫自動編碼. MySQL - 自動編號的使用 AUTO_INCREMENT 屬性: 可指定在整數欄位上,但必須是 NOT NULL 、 PRIMARY KEY 、 UNIQUE 三種之一時, 另外此屬性一個資料表只能出現一次。. 資料庫自動編碼. INSERT 時, AUTO_INCREMENT 欄位若沒有指定值,且沒有指定 NULL , 此時會進行自動編號,此欄位依然可以手動指定編號。. 武器資料修改部分. (1)inner join <% ResultSet rs;

raina
Download Presentation

10/05 號專題報告

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 10/05號專題報告 Web網頁遊戲 曾建瑋

  2. 資料庫自動編碼 • MySQL - 自動編號的使用 • AUTO_INCREMENT屬性: • 可指定在整數欄位上,但必須是 NOT NULL、PRIMARY KEY、UNIQUE 三種之一時, • 另外此屬性一個資料表只能出現一次。

  3. 資料庫自動編碼 • INSERT 時,AUTO_INCREMENT欄位若沒有指定值,且沒有指定 NULL, • 此時會進行自動編號,此欄位依然可以手動指定編號。

  4. 武器資料修改部分 • (1)inner join • <% • ResultSet rs; • String wpno = request.getParameter("wpno"); • String sql="SELECT weapons.wpno, wpname, wpw, wpcno, pa, ca, price, prno, mosaic, weaptype.weaptypeno, weapname ,property.propertyno, propname FROM (weapons inner join weaptype on weapons.wpcno=weaptype.weaptypeno)inner join property on weapons.prno=property.propertyno WHERE wpno='" + wpno + "'"; • rs = stmt.executeQuery(sql); • if(!rs.next()) { • out.println("找不到資料"); • } else { • %>

  5. 武器資料修改的部份 • 可是這樣下拉式選單會被鎖住 • 所以說目前在測試先將下拉式選單的值抓入陣列然後再讀出來看這樣下拉式選單會不會還是一樣可是這樣inner join就沒用了

More Related