Webform之(簡單投票)練習

2022-05-05 13:33:09 字數 2392 閱讀 5444

建立資料庫:

create table diaoyantimu

( ids

int primary key ,--題目代號

title varchar(

50) not null ,--要調查的題目

selectiontype

int,--單選多選代號,0-單選,1-多選

isover bit,--是否結束,true-結束,flase-未結束

)gocreate table diaoyanxuanxiang

( ids varchar(

50)primary key,

options varchar(

50),--調研每個題目的選項內容

numebers

int,--選擇此調研選項的人數

timudaihao

int references diaoyantimu(ids),--所屬調研題目的代號

) insert into diaoyantimu values('1

','晚上在家幹啥?

','0

','0')

insert into diaoyantimu values('2

','自己那個地方有欠缺

','1

','1')

insert into diaoyanxuanxiang values('1

','玩遊戲

','0

','1')

insert into diaoyanxuanxiang values('2

','睡覺

','0

','1')

insert into diaoyanxuanxiang values('3

','吃飯打豆豆

','0

','1')

insert into diaoyanxuanxiang values('4

','做練習

','0

','1')

insert into diaoyanxuanxiang values('5

','知識點不會

','0

','2')

insert into diaoyanxuanxiang values('6

','聽不懂

','0

','2')

insert into diaoyanxuanxiang values('7

','比較懶欠練習

','0

','2')

insert into diaoyanxuanxiang values('8

','解決能力弱

','0

','2')

insert into diaoyanxuanxiang values('9

','缺乏資源

','0

','2')

select * from

diaoyantimu

select * from diaoyanxuanxiang

view code

aspx**:

c#" autoeventwireup="

true

" codefile="

default.aspx.cs

" inherits="

_default

" %>

system.linq

" %>

"-//w3c//dtd xhtml 1.0 transitional//en""

">

"">

aspx.cs**:

using

system;

using

system.collections.generic;

using

system.linq;

using

system.web;

using

system.web.ui;

using

system.web.ui.webcontrols;

public

partial

class

_default : system.web.ui.page

}protected

void button1_click(object

sender, eventargs e)}}

}

PHP 練習 投票

練習 投票 一 題目要求 二 做法 建立資料庫 表名 diaoyantimu 表名 diaoyanxuanxiang 封裝類檔案 1 2class dbda335 else 364041 42else 4347 4849 50 51 5253 5455 56 首頁 1 public w3c dtd ...

PHP投票練習

1 連線資料庫查詢資料顯示在頁面中 2 將需要改變資料的主鍵值提交到處理頁面 3 處理頁面中通過主鍵值找到資料中的計數列的值,將計數列的的值加1複製給計數列 4 在另乙個頁面顯式結果 可以複製貼上執行 資料庫表 效果圖結果圖 主頁面 include dbda.class.php db new dbd...

簡單的自動投票

最近喜歡上了wz,就經常去wz吧逛,發現有很多關於zwz的投票活動。老實講我倒是對投票本身沒啥興趣,主要是看到自己喜歡的明星那名次排在後面就很鬱悶,於是我也就加入了投票這場戰鬥。可是我還有其他的事要做啊,實在是扛不住跟其他小孩那樣沒日沒夜的刷票。於是在球的提議下開始分析那個頁面的原始碼,看能不能弄成...