mysql - Query updates in phpmyadmin but shows wrong query in website -
we have project regarding showing content of our database in website after update. updating part doesn't have problem showing table have. please help. here screen shot:
this screen shot of query in website: 
 screenshot of database in there's problem 
as can see, paid , cardtypeid columns not getting right data database. shows same data records.
here query:
select t.transid, t.date, m.memid, m.fname, m.lname, m.contact, c.cardtypeid,         m.cardnum, t.amount, c.paid, m.expirydate transaction t, members m, card c m.memid = t.memid group t.memid order t.transid desc   thanks help.
** here other tables:
members table:

transaction table:

card table:

all of data inside of them same specially member ids.
you have not joined card c table properly... need
select t.transid,         t.date,         m.memid,         m.fname,         m.lname,         m.contact,         c.cardtypeid,         m.cardnum,         t.amount,         c.paid,         m.expirydate    transaction t,         members m,         card c   m.memid = t.memid  , c.transid = t.transid  //(if field exists in both tables) group  t.memid  order  t.transid desc       
Comments
Post a Comment