php,mysql查詢問題,求方法

時間 2022-05-24 15:50:03

1樓:強不在乎

select r.username,b.truename,r.

type,r.regisdate from regisuser r left join basicinfo on r.username = b.

tb_user;

2樓:匿名使用者

你建立的表就有問題,沒有id,正確的欄位應該是表一 basicinfo

id ,tb_user, school ,truename ,note

表二 regisuser

uid, username,type,regisdate,password

select a.truename,b.username,b.

type,b.regisdate form basicinfo as a ,regisuser as b where a.id = b.

uid;

3樓:匿名使用者

select `regisuser`.`username` as `username` , `basicinfo`.`truename` as `truename`, `regisuser`.

`tpye` as `tpye`, `regisuser`.`regisdate` as `regisdate` from `basicinfo` , `regisuser` where `basicinfo`.`tb_user` = `regisuser`.

`username`

mysql三張表關聯查詢,(PHP)MySQL三張表或者多張表關聯查詢

語句為 select a.uid,a.uname,a.upsw,a.urealname,a.utel,a.remark,if exists select from sysdatabases where name databasename drop database databasename go t...

php mysql兩個表關聯問題吧應該是

最土的方法是分三步1,插入資料到outquery。這個很簡單了,insert into outquery id values id 2,查詢出最新插入的id,select id from outquery order by id desc limit 0,1 假設得到的是 latestid.3,插入...

access查詢問題,access 查詢問題,

了給分。a1 3 b1 6 c1 6 d1 3 e1 3 f1 0 str1 cstr a1 cstr b1 cstr c1 cstr d1 cstr e1 cstr f1 把所有字串合併 list 0 for i 1 to 6 len1 len str1 得到字串長度 t1 mid str1,1,...