Home > Backend Development > PHP Tutorial > 小弟在尝试着做一个PHP的用户管理系统有三张关联的表怎么在编辑用户时显示出相应的信息

小弟在尝试着做一个PHP的用户管理系统有三张关联的表怎么在编辑用户时显示出相应的信息

WBOY
Release: 2016-06-13 12:06:03
Original
1131 people have browsed it

小弟在尝试着做一个PHP的用户管理系统有三张关联的表如何在编辑用户时显示出相应的信息
现有三张表  user  group groupuseruser表是用户信息 里面有用户ID,账号,姓名  uid,account,namegroup是群组表里面有群组ID 名称 did  namegroupuser 是群组用户表里面有 用户ID 群组ID  uid did我想在编辑用户的时候 让他显示出来所属群组的名字 请问如何弄,小弟是个新手望各位前辈赐教一下 
------解决方案--------------------

<br /><br />select c.name from `user` a,`group` b,`groupuser` c where a.uid = c.uid and b.did = c.did and a.uid = '用户uid';<br /><br />
Copy after login

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