Webmaster Forum

Ezilon Directory   Advertise Here   V7N Directory
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Reply
 
LinkBack Thread Tools Display Modes
Old 08-25-2007, 12:22 AM   #1 (permalink)
Inactive
 
Join Date: 08-25-07
Posts: 2
iTrader: 0 / 0%
Latest Blog:
None

MephDaddy is liked by many
(PHP/Mysql) Question reguarding tables and sharing data between.

Ok here is my problem:

I have 2 tables, instance and boss

boss table has 3 varables [id, name, instid]
instance table has 2 variables [id, name]

in boss.instid is my way of pointing to instance.id

When displaying my information for the boss table I would like to show id, name, and instid.

But instead of just having a number that represents my instid i want it to take the name from instance table that is associated with that id.

I have searched thru endless tutorials on how to try and do this and have yet to find something that gives me a hint about how to do it. I might even be going about this the entirly wrong way.

I would appreciate any advise people can give me on this. I do I hope i made my idea clear.
MephDaddy is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 08-25-2007, 10:57 AM   #2 (permalink)
v7n Mentor
 
Taltos's Avatar
 
Join Date: 11-22-06
Location: Phoenix, AZ
Posts: 1,787
iTrader: 0 / 0%
Latest Blog:
None

Taltos is a highly respected web proTaltos is a highly respected web proTaltos is a highly respected web proTaltos is a highly respected web proTaltos is a highly respected web proTaltos is a highly respected web proTaltos is a highly respected web proTaltos is a highly respected web proTaltos is a highly respected web proTaltos is a highly respected web proTaltos is a highly respected web pro
Send a message via Yahoo to Taltos
you need to do a sql query that looks something like this:
Code:
select boss.id, boss.name, instance.name from boss join instance on boss.instid = instance.id
That should return what you are looking for and you can use php/mysql commands to read the data and do whatever you need to with it.

Good Luck
__________________
Experimenting
Taltos is offline  
Add Post to del.icio.us
Reply With Quote
Old 08-25-2007, 11:47 AM   #3 (permalink)
Inactive
 
Join Date: 08-25-07
Posts: 2
iTrader: 0 / 0%
Latest Blog:
None

MephDaddy is liked by many
I will give that a try thank you.
MephDaddy is offline  
Add Post to del.icio.us
Reply With Quote
Old 08-25-2007, 01:09 PM   #4 (permalink)
Moderator
 
ToddW's Avatar
 
Join Date: 01-11-04
Location: Folsom
Posts: 2,623
iTrader: 0 / 0%
ToddW is a web professional of the highest orderToddW is a web professional of the highest orderToddW is a web professional of the highest orderToddW is a web professional of the highest orderToddW is a web professional of the highest orderToddW is a web professional of the highest orderToddW is a web professional of the highest orderToddW is a web professional of the highest orderToddW is a web professional of the highest orderToddW is a web professional of the highest orderToddW is a web professional of the highest order
Send a message via AIM to ToddW
If you index the join column it will go faster
__________________
Learn about Bear Grylls, Les Stroud, Man Vs. Wild & SurvivorMan at Survival TV Shows
Order Exciting Inspirational Posters from Inspirational Posters at great value.
ToddW is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
stupid LOCK TABLES message with MySQL - please help! CircleOfLinks Web Design Lobby 5 01-01-2008 04:21 AM
Returning MySQL Results as HTML Tables... Or something like that. Mega Mario Coding Forum 9 12-22-2007 07:20 AM
question about linking tables I like pie Coding Forum 6 03-28-2006 08:14 PM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 05:45 AM.
© Copyright 2008 V7 Inc