PHP MySQL query using UNIONs and locating which table the data came from
问题 So I have a query that I am selecting values from two different tables and UNIONizing them together. I need to know where which entry came from as I need to form a different URL for each. What is the best way and proper syntax to tag both of these SELECT queries. Any help would be appreciated. Code to follow: $query = "SELECT newsletter_id id, newstitle title FROM tbl_news WHERE (newstitle LIKE '%".stripslashes($rowCont->fname)."%' && newstitle LIKE '%".stripslashes($rowCont->lname)."%') ||