Results 1 to 3 of 3
  1. #1

    * mysql queries and php


    Would like to find out how to code in php for the following.

    I have 2 tables in a database. Table A having all the information on a particular product while table B stores information which is the subset of table A.

    How to do the mysql queries to display all information from Table A but minus of the information from Table B?


  2. #2
    Join Date
    Sep 2002
    just select information from table A

    mysql> SELECT * FROM A;
    How's my programming? Call 1-800-DEV-NULL

  3. #3
    Why are two tables storing the same data? If you want to have subsets, it would be a better idea to give each entry a group_id or something similar and you can then get your subsets through "select * from table where group_id = x". Obviously you can come up with more complex solutions for more complex queries, but you shouldn't really be duplicating data across two tables - it makes for slow and awkward queries and makes maintenance harder and slower as well.

Posting Permissions

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