0

I have 2 databases 1st one for employees name and phone number and salary and the second database is for their accounts contain name and password and account type my question How can I make a query with php and mysql to search for employee name and base on his phone number will show me all other info

I tried to take $row["phone"]; to make a static value to search in the other database but no result to show

thank you

  • You have two tables and not two databases. In sql the join operation is used to combine data from two related tables based on a common data element. See the answers to the duplicate question how to join two tables. – Shadow Nov 25 '21 at 19:32
  • No sir tow databases – ahmed alday Nov 25 '21 at 19:44
  • What you described in your question are tables, not databases. The two tables may be in different databases, but that did not come across. If your tables indeed sit in different databases, then there are answers for you already here on SO. – Shadow Nov 25 '21 at 19:58
  • Yes sir its 2dbs and evrey db contain a table this is ashort version of story – ahmed alday Nov 26 '21 at 09:07
  • Are these databases on the same mysql server? – Shadow Nov 26 '21 at 09:11
  • yse sir both of theme in one mysql server – ahmed alday Nov 26 '21 at 21:28

0 Answers0