php - Search multiple tables in mySQL database -


i want search mysql table , want show results different tables.

following setup in tables,

first table "user_initials":

user      pic kashif   images/kashif.jpg asif     images/asif.jpg 

second table "user_data":

user     user_id kashif   155 asif     156 

i have made query search keywords user_initials "user" field. want show results as: if search kashif, result should kashif 155

what should query?

use join

select * user_initials inner join user_data on user_initials.user = user_data.user user_data.user = 'kashif' 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -