The Little Guy Posted March 24, 2009 Share Posted March 24, 2009 I need to get some info from two tables, but I can't remember how to do it, I don't want to use a join I know that for a fact. I also want to create a column that says what table the data came from. So.. how do I select from 2+ tables again? Quote Link to comment https://forums.phpfreaks.com/topic/150840-solved-a-select-question/ Share on other sites More sharing options...
The Little Guy Posted March 24, 2009 Author Share Posted March 24, 2009 I should mention this is the two table structures: Table (mailbox): id : Primary - auto increment owner subject inbox outbox status date Table (friends): id : Primary - auto increment req rec acc date This is the output i would like to obtain: id table subject summary So to explain that, id will be the id in the table that it came from table will be the table that it came from (mailbox or friends) subject will be a subject line (if from table mailbox use default subject cell, if from from friends table use "Friend Request") summary a short description of what is in the mail (if from table mailbox use default inbox cell, if from friends table use "You have received a new friend request") Quote Link to comment https://forums.phpfreaks.com/topic/150840-solved-a-select-question/#findComment-792392 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.