php search

Discussion in 'PHP and MySQL' started by stacy.higins, Jan 9, 2011.

  1. stacy.higins

    stacy.higins Guppy

    hey guys i got stuck in php-search i have 2 tables name as

    employee and emp_performance

    in employee table i have 4 columns name as emp_id, emp_name, address and postcode

    in emp_performance table i have 3 columns emp_id, emp_performance, emp_bonous


    now i have to make a search with the emp_id and emp_name.

    i have done it with emp_id but with emp_name i am not getting what should i do

    so can anybody tell me that with emp_name how can I fetch records from both the tables using the emp_name

    m just not getting it because there is no column name as emp_name in second table


    plz help me out... any help will be appreciable

    cheers

    stacy
  2. Lukesh

    Lukesh Perch

    As you have emp_id in both tables you should use join of tables at emp_id. Please go through tables joins and you will get what you want.

Share This Page

JodoHost - 26,000 hosting end-users in 100 countries
Plesk Web Hosting
VPS Hosting
H-Sphere Web Hosting
Other Services