开发者

how to implement join operator

I have an 3 tables in my database as shown below:-

 (1) users_registration
     - username
     - email
     - acode

 (2) vendor_registration
    开发者_开发技巧 - vid
     - vkey
     - btype
     - email
     - pass
     - bussname
     - regdate
     - url
     - ownerfname

 (3) vorder
     - ttime
     - vid
     - tid
     - oid
     - uid
     - amount
     - cardid

username in users_registration table and uid in vorder table is same.

my code is so far :-

SELECT vo.ttime,vo.vid,vo.tid,vo.oid,vo.uid,vo.amount,vo.cardid, vr.bussname 
from vorder vo 
INNER JOIN vendor_registration vr ON vo.vid=vr.vid
where uid='".$name_array[$z]."'
order by ttime desc";

after applying this code my page seems like that ![enter image description here][1]

Actually, I want to show my bussname in the place of vid

 e451ffc8-db29-4c08-ac67-0177aec6e2ab as shown in image vendorname,


    SELECT vo.ttime, vr.bussname, vo.tid, vo.oid, vo.uid, vo.amount, vo.cardid
      FROM vorder vo 
INNER JOIN vendor_registration vr 
        ON vo.vid = vr.vid 
     WHERE uid = '".$name_array[$z]."' 
  ORDER BY ttime DESC
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜