生成试卷保存有关问题

WBOY
Release: 2016-06-13 10:18:11
Original
1014 people have browsed it

生成试卷保存问题
从数据库选取题号,然后进行排版生成一份试卷
接下来就是保存试卷问题?
各位有什么好的建议嘛?
把试卷所有内容生成word进行保存?
还是把题号进行保存,当要提取这份试卷时在去提取题号?

------解决方案--------------------

探讨

P_ID 试卷编号
P_NAME 试卷名称
P_TIME 时间
T_ID 教师号
那你那样说建立起来的表怎么区分不同试卷?
你那等同我的题库··
我想要的是从题库抽取部分题号建立一个新的试卷表,

------解决方案--------------------
对。varchar类型就行。 这样取: select * from 题库表 where id in('1,2,3'); //取出1,2,3三道题。
------解决方案--------------------
PHP code
将其拼起来就行了:1:$a = 1;$b = 2;$c = 3;$code = $a.",".$b.",".$c;2:$a = array(1,2,3);$code = implode(",",$a);$sql = "select * from table where code in(".$code.");"<br><font color="#e78608">------解决方案--------------------</font><br>
Copy after login
探讨

题号用逗号隔开,那也是string类型啊?那提取的时候怎么提取?

------解决方案--------------------
保存时将 题号 用,好连接存入即可。 提取时当然得循环输出。
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!