Главная страница Случайная страница КАТЕГОРИИ: АвтомобилиАстрономияБиологияГеографияДом и садДругие языкиДругоеИнформатикаИсторияКультураЛитератураЛогикаМатематикаМедицинаМеталлургияМеханикаОбразованиеОхрана трудаПедагогикаПолитикаПравоПсихологияРелигияРиторикаСоциологияСпортСтроительствоТехнологияТуризмФизикаФилософияФинансыХимияЧерчениеЭкологияЭкономикаЭлектроника |
TblUsers
See design for description
TblGame See design for description
Table Relationships Each Game has the black player and the white player linked through the tblUser.Id field. With enforced referential integrity this means that the Black and White player will always link to users
Database Query Design English On the frmGame, once a game has finished, if the game was between two human players then insert a new record into the tblGame storing the players who were black and white and the player who won. SQL INSERT INTO tblGame (GameDate, WhitePlayer, BlackPlayer, Winner) VALUES ('?? /?? /?? ',?,?,?); Code sql = " INSERT INTO tblGame (GameDate, WhitePlayer, BlackPlayer, Winner)" sql += " VALUES ('" & Date.Now() & " ', " & playerWhite & ", " & playerBlack & ", " & winner & "); " ds = dbConnector.SQLinsert(sql)
|