Ian Davies wrote:
hello
can anyone help me with an sql statement that will work for mysql to take
data from two tables where the two tables are linked with a common field. As
you can guess im new th mysql
This is practically part of the first chapter of any book on SQL.
What you want is called a "join".
I'd suggest you get a book on SQL. "SQL for Dummies" is a good
beginning book. I don't mean to be condescending -- that book is
actually a pretty good choice.
You can also read many beginner tutorials for SQL or other programming
topics on the internet. Go to
www.google.com and search for "sql join
tutorial".
Here are the first two matches from that search:
http://sqlzoo.net/ http://www.w3schools.com/sql/
Newsgroups aren't the best place to learn the basics, newsgroups are
better for more specialized questions. It's not appropriate to ask
people on the net to type in lessons that are already easily available.
You'll get all the information you need much more quickly (and almost
certainly written better) from a book or an online tutorial.
Regards,
Bill K.