Search a table or other with PHP

Asked

Viewed 19 times

0

What I would like is this: I have two tables, being tabelaA and tabelaB. I want the term searched if not found in a table, to be consulted in the other table. I don’t know if there’s anything that can put the two tables together or how that could happen. So, in summary, if I type by cell phone, the survey will return the data either from table A or table B.

  • You could do an if in the search query result of the table, and if not found, you search in table B with a new query!

  • It would not compromise the performance of the portal making conditions in sql?

  • I think it would be the only option, are two different tables, you will have to execute another query!

  • 1

    Yeah, I tried it here and it worked. Thank you!

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.