If you are selecting the ID's from a list box then you need PHP or something to connect to the DB and perform the query.
As MYSQL cannot produce any type of list box.
I'm guessing what you mean is you want a single query to join the tables.
Try:
Code:
SELECT table1.fieldname1, table1.fieldname2, table2.fieldname1, table2,fieldname2 ... FROM table1, table2 WHERE table1.id=table2.id AND table1.id=$idfromlist;
----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
Many thanks to you both. I looked for hours on the internet for what I wanted that did not have PHP reference. I am trying to fill a datagridview control in VB.Net connected to MySql server. All the references I found were all creating tables etc, and SQL to a single table. I now have the syntax for my query from you, and thanks. Now I will go over to the VB.Net forum to fire more questions.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.