这里需要一些帮助来创建登录页面... [英] Need little help here to create login page ...

查看:71
本文介绍了这里需要一些帮助来创建登录页面...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个登录页面,



表格:

数据库有表格学生和教师



架构:

" student"表格中包含sid,spass,sfname .....等栏目。

" faculty" table有列fid,fpass,ffname ......等等



问题---

我想要创建包含所有sid,fid的临时表作为用户名以及所有spass,fpass作为密码柱。因此结果表应该只有2列包含所有成员的用户名和密码,我可以进一步使用验证成功登录。

那么我必须写什么查询来提取该表? div class =h2_lin>解决方案

我调整了一点,发现了我正在寻找的确切查询,谢谢你的帮助朋友,这里是对未来的问题的查询:



 SELECT sid AS allusername,
spass AS allpassword
FROM student

UNION

SELECT fid AS allusername,
fpass AS allpassword
FROM faculty


I am creating a login page,

tables:
database has tables "student" and "faculty"

schema:
"student" table has columns "sid,spass,sfname.....etc."
"faculty" table has columns "fid,fpass,ffname......etc"

Problem---
I want to create a temporary table which contains all "sid,fid" as "username" and all "spass,fpass" as "password" column. thus resultant table should have only 2 columns containing username and password of all members , witch i can use further to apply validation for successful login.
So what query i have to write to extract that table ??

解决方案

I tweaked a little and found out the exact query i was looking for , thank you for your help pal, here is the query for future out fellas:

SELECT sid AS allusername,
 spass AS allpassword 
 FROM student 

UNION 

SELECT fid AS allusername, 
 fpass AS allpassword 
 FROM faculty


这篇关于这里需要一些帮助来创建登录页面...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆