» Quick Links
You can make money on these forums
We Share profits with you
Google
Google Adsense
Google Adwords
YPN
Yahoo
MSN Search
Web Directories
Web Hosting
Web Hosting Offers
Hosting News
Suggestions
Link Building
Domain Names
PHP Forums
MySQL Forums
» More Links
OSP News
Reseller Hosting
Shared Hosting
Dedicated Servers
Google Adsense
Search Engine Marketing
Link Development
Affiliate Marketing


» Advertising
Multiple DC PR Check

Free SEO Tools


Go Back   Webmaster Forums > Website Developement / Programming > MySQL Forums

MySQL Forums Share Your Ideas and Tips about MYSQL. Ask questions about MYSQL. Table Design and Much More...

Reply
 
Thread Tools Display Modes
  #1  
Old 07-29-2006, 03:12 PM
cyberhost cyberhost is offline
OSP Starters
 
Join Date: Jul 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
cyberhost is on a distinguished road
Cool Getting all rows from two tables

Hi everybody

I've two tables audio and video and need to get all the rows from two tables by joining. How do i do that.I need all the columns from both the tables. audio_sid and video_sid from both tables are same along with audio_prog_num and video_prgm_num from audio and video tables respectively.

Any inputs will be welcomed -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Revenue Sharing Ads ( ?):
  #2  
Old 07-29-2006, 03:17 PM
pixel pixel is offline
OSP Starters
 
Join Date: Jul 2006
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
pixel is on a distinguished road
Default

I have not exactly got your point as you have not explained your table layouts in detail, but anyways, here's the code

select audio.audio_sid
, audio.video_sid
, audio.audio_prog_num
, audio.video_prgm_num
, audio.some_other_columns
, video.some_other_columns
from audio
inner
join video
on audio.audio_sid = video.audio_sid
and audio.video_sid = video.video_sid
and audio.audio_prog_num = video.audio_prog_num
and audio.video_prgm_num = video.video_prgm_numif this isn't exactly -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Reply


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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
deleting 2 tables??? Bkira MySQL Forums 1 01-23-2007 09:21 AM
updating two tables Tipal MySQL Forums 1 12-19-2006 04:10 AM
updating two tables? muller MySQL Forums 1 10-27-2006 05:44 AM
deleting rows in database!! Miltan MySQL Forums 1 09-07-2006 08:57 AM
Lock Tables?? Bailee MySQL Forums 1 08-16-2006 06:54 AM


All times are GMT. The time now is 08:45 PM.