[PHP-DB] help me on projecting some tables

2001-11-16 Thread Carlo Loiudice
Hi, I've to store in a BD some alimentary product, and there are lot of informations like chemical, physical, nutritional characteristics , ... I don't know how to store this info. So I've a lot of product with a lot of corresponding characteristics. I've thought about to create a table where to

[PHP-DB] is it a Many-to-Many relationship ???

2001-11-13 Thread Carlo Loiudice
Ok, pardon: Table1: ID,weight,m_weight,height,m_height Table2: ID,measure_name This is the question: I've to build a query that gives me with a single select, two rows of the table2. If you can, please give me some hints about this problem: store data with relatives measure units, and a way to

[PHP-DB] is it a Many-to-Many relationship ???

2001-11-12 Thread Carlo Loiudice
HI again. I'm doing this: I'm a table where there are 4 fields like this: height,measure height,weight, measure weight. Then a 2nd table, where I've all measures defibed. How can I select 2 different rows from the 2nd (measures) table related to 1 entry in the 1st table with a single select

[PHP-DB] JOIN operations

2001-11-09 Thread Carlo Loiudice
Hi, I'm preforming a join between 2 Mysql tables in this way: table_name: ID,name,ID_city table_city: ID,city when I query this: SELECT table_name.name,table_city.ID,table_city.city FROM table_name,table_city WHERE table_name.ID_city=table_city.ID The result is a new table with this fields:

[PHP-DB] Automatic JOIN

2001-11-09 Thread Carlo Loiudice
Pardon, another question: Is there a way to say to Mysql to automatically detect a relation between 2 table and perform the join operation when there's a SELECT query ? I Hope this isn't a stupide question! But I've seen that in the detested MS Access, there a simple way so make a visual join