Results 1 to 3 of 3

Thread: Selecting from 2 tables

  1. #1
    Roll Tide! mobilebadboy's Avatar
    Join Date
    Apr 2004
    Location
    Mobile, AL
    Posts
    428

    Selecting from 2 tables

    This is new territory for me, i've typically been a single table person.

    I have 2 tables:

    product_entertainment
    - CategoryNumber
    - ProductNumber
    - Rank

    image_entertainment
    - several columns
    - ProductNumber
    - More columns

    I want to select a specific CategoryNumber from product_entertainment and retrieve all of the information from image_entertainment where the ProductNumber matches the ProductNumber in product_entertainment.

    If that makes sense.

    I'm sure I'm way off, but this is what I tried to come up with (I hate learning new stuff sometimes).

    PHP Code:
    select image_entertainment.*, product_entertainment.* 
    from image_entertainmentproduct_entertainment 
    where product_entertainment
    .CategoryNumber '12911' 
    and image_entertainment.ProductNumber 
    'product_entertainment.ProductNumber' 
    Shawn Kerr .com

  2. #2
    Administrator Chris's Avatar
    Join Date
    Feb 2003
    Location
    East Lansing, MI USA
    Posts
    7,055
    its right, EXCEPT no quotes around the very last part.
    Chris Beasley - My Guide to Building a Successful Website[size=1]
    Content Sites: ABCDFGHIJKLMNOP|Forums: ABCD EF|Ecommerce: Swords Knives

  3. #3
    Roll Tide! mobilebadboy's Avatar
    Join Date
    Apr 2004
    Location
    Mobile, AL
    Posts
    428
    Doh. Thanks, Chris.
    Shawn Kerr .com

Similar Threads

  1. Convert javascript links to html/php links.
    By agua in forum Website Programming & Databases
    Replies: 5
    Last Post: 01-19-2007, 04:29 PM
  2. Tables
    By izwar in forum HTML, CSS, Layout, and Design
    Replies: 5
    Last Post: 08-08-2006, 05:17 AM
  3. AWS - selecting items for display (ASIN)
    By MarkB in forum Website Programming & Databases
    Replies: 7
    Last Post: 07-06-2004, 03:24 AM
  4. Selecting an appropriate db and language
    By saraj in forum Website Programming & Databases
    Replies: 6
    Last Post: 02-05-2004, 10:44 PM
  5. tables help im confused
    By s2kinteg916 in forum HTML, CSS, Layout, and Design
    Replies: 14
    Last Post: 12-02-2003, 09:28 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •