General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old July 19th, 2002, 07:07 PM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,246 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
Joins .Vs Lookup Table

Just out of curiousity, I wanted everyone's opinion on what their preferred method for joining data in queries is?

I've been hearing a lot of hype about JOINs and have also heard other's opinions in that they don't like using them.

What is your preferred method, and why?

Also, what are the main differences between using a Lookup table rather than using JOINs?
__________________
____________________________________________
Developer Shed Weekly Writer | DevArticles Forum Moderator
Build Your Own KlipFolio Klip With PHP
FrankManno.com - Under Construction
Design Interactive Group - Under Construction

Reply With Quote
  #2  
Old July 20th, 2002, 07:55 PM
fakker fakker is offline
The calm b4 the storm
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Manchester, UK
Posts: 404 fakker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via Yahoo to fakker
I use INNER JOINS in most of my SQL... I like it because it means I only have to do one SQL statement to get all my results... eg:

I can get all my member information at the same time as I can get the news items that member posted.....

I don't really know of any other way of doing it!!

apart from opening two seperate data sources.......
__________________
Matt 'Fakker' Facer

mattfacer.com

Reply With Quote
  #3  
Old July 21st, 2002, 09:50 AM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,246 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
Fakker,

Would you mind posting an example of how you go about doing your inner joins?

I'm sure it would give everyone a better idea, as I find that many people are confused when it comes to JOINs.

Reply With Quote
  #4  
Old July 21st, 2002, 09:59 AM
wAr-AnGeL wAr-AnGeL is offline
Forum Security
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Behind You
Posts: 479 wAr-AnGeL User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 m
Reputation Power: 7
Send a message via ICQ to wAr-AnGeL Send a message via AIM to wAr-AnGeL
PHP Code:
 $result mysql_query("SELECT news.nid, news.authorName, news.date, news.subject, news.newsContent, admins.username, admins.email FROM news LEFT JOIN admins ON news.authorName = admins.username ORDER BY news.date desc"); 


That's the query I do to get my news from my database. It gets news from the news table and gets the admin's email from the admin table. Hope it helps.
__________________




"Only Linux users see the end of crashes."
- Pl4t0

Reply With Quote
  #5  
Old July 22nd, 2002, 01:21 PM
Phynias Phynias is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 18 Phynias User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
inner join

SELECT table1.user, table1.stuff, table2.address from (table1 INNER JOIN table2 on table1.user_id = table2.unique_id) order by table.user

Reply With Quote
  #6  
Old July 22nd, 2002, 05:40 PM
fakker fakker is offline
The calm b4 the storm
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Manchester, UK
Posts: 404 fakker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via Yahoo to fakker
looks like everyone beat me to my answer..!

Yeah, that is how I do my inner join.... but I also kinda cheat.... (sometimes ) ...

I first learned how to do the inner joins from Access 2000. When I was creating an ASP site, I did the query in access which wrote the SQL code for me.. then I cut and paste'd it in to my ASP code!!

Sometimes the best things in life are.....microsoft?



Reply With Quote
  #7  
Old July 22nd, 2002, 05:44 PM
fakker fakker is offline
The calm b4 the storm
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Manchester, UK
Posts: 404 fakker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via Yahoo to fakker
oh lordy... I'm gonna get shot for that aren't I?!!!



Reply With Quote
  #8  
Old July 22nd, 2002, 06:50 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
you will burn in hell for saying that! and no, im not joking either

Reply With Quote
  #9  
Old July 22nd, 2002, 06:58 PM
fakker fakker is offline
The calm b4 the storm
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Manchester, UK
Posts: 404 fakker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via Yahoo to fakker
yup....I'm sure gonna pay.... sorry.... but I have never been shown the greener grass on the other side...

I found these on my old back up CD.....
you've probably all seen them before..but as they say.. the old ones are the best...

enjoy..

http://www.thebluenowhere.co.uk/windoze/windoze.htm


Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Joins .Vs Lookup Table


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five &quot;checkpoints&quot; for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Iron Speed




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway