Zaloguj | Zarejestruj | FAQ
Anonymous

how to get table records by user login id

+ Odpowiedz

Posty: 2 Strona 1 z 1


how to get table records by user login id

przez jrevathi » Wt mar 11, 2014 8:24 pm

i have two user tables in my database. one is users table and another one is users records table, one user login id = one user record id how to get user records in user login page in phpmysql

please help me,

Thanks in advance
Avatar użytkownika

jrevathi

  • Posty: 3
  • Dołączył(a): Wt mar 11, 2014 8:12 pm

Re: how to get table records by user login id

przez XainPro » Cz mar 13, 2014 5:40 am

i think this query might work you need to replace $username and $password with the user inputed variables i.e $_GET['username'] etc
select * from records r, users u where u.username = $username and u.password = $password AND u.id = r.id;
Avatar użytkownika

XainPro

  • Posty: 3933
  • Dołączył(a): Pt lut 17, 2012 8:10 pm


+ Odpowiedz

Strona 1 z 1