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: this screen shot of query in website: screenshot of database in there's problem this 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:

members table structure

transaction table:

transaction table structure

card table:

card table structure

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

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -