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
Post a Comment