homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

MySQL Multiple Query

 10:28 pm on Oct 14, 2008 (gmt 0)


I am trying to select data from two separate tables and display everything, not filter based upon information within both tables.

Example, i would like to join these to statements together:

SELECT first,last,email from users;

SELECT first,last,email from contacts;

Any ideas or direction? I have looked into JOINS but doesnt seem to be offering what i'm looking for.




 10:47 pm on Oct 14, 2008 (gmt 0)

SELECT first,last,email from users
SELECT first,last,email from contacts;


 11:20 pm on Oct 14, 2008 (gmt 0)

Both tables look very similal why are you storing same data twice?


 12:41 am on Oct 15, 2008 (gmt 0)

Different data, same fields....contacts contain information not relative to the users table...I will try the union...thanks!


 12:44 am on Oct 15, 2008 (gmt 0)

UNION was exactly what i was looking for. Thanks!


 7:05 am on Oct 30, 2008 (gmt 0)

Which would be best for passing one login username/password to a main script and subscripts, for bypassing the need of the user to sign unto each and every sub script seperately...

Example would be for the main login to pass the active session to all of the multiple scripts in the entire site for automatic accessability without having to login for each new script.

Join, Union or a different process all together?

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved