hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : mysql queries and php
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.
Forum Jump

mysql queries and php

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 09-26-2002, 08:05 PM
alancsl alancsl is offline
New Member
 
Join Date: Sep 2002
Posts: 1
*

mysql queries and php


Hi,

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?

Thanks.

Reply With Quote


Sponsored Links
  #2  
Old 09-27-2002, 12:18 PM
null null is offline
Web Hosting Master
 
Join Date: Sep 2002
Location: Illinois
Posts: 2,305
just select information from table A

mysql> SELECT * FROM A;

__________________
How's my programming? Call 1-800-DEV-NULL

Reply With Quote
  #3  
Old 09-27-2002, 05:08 PM
Barak Barak is offline
Junior Guru Wannabe
 
Join Date: Mar 2001
Posts: 33
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.

Reply With Quote
Sponsored Links
Reply

Related posts from TheWhir.com
Title Type Date Posted
Web Host Rackspace Launches Private Beta for MySQL Cloud Database Web Hosting News 2011-12-01 21:09:51
Parallels Now Offering Licenses for CloudLinux OS Web Hosting News 2011-10-26 17:29:25
Web Hosting Sales and Promos Roundup - October 7, 2011 Web Hosting News 2011-10-07 19:56:18
Web Hosting Software Firm CloudLinux Releases CloudLinux OS Version 6.1 Web Hosting News 2011-09-13 14:08:49
Web Host FireHost Partners with Cloud Security Firm Gazzang for Data Encryption Web Hosting News 2011-08-16 20:33:43


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?