[thelist] MySQL query help

David Kutcher david_kutcher at hotmail.com
Sun Jun 9 00:35:01 CDT 2002


Always lable which columns you want.  Keeps things orderly and increases the
speed of the query.

SELECT Tasks.ID, Tasks.CatID, Tasks.StatusID, Categories.ID,
Categories.CategoryName, Status.ID, Status.StatusTitle FROM Tasks,
Categories, Status WHERE Tasks.ID = Categories.ID AND Tasks.ID = Status.ID

This is nitpicky, but you might want to consider not mixing caps and
lowercase.  Not a great habit to have.

David
www.confluentforms.com

----- Original Message -----
From: "John Corry" <webshot at members.evolt.org>
> Try this and see what you get
>
> $query = 'SELECT * FROM Tasks, Categories, Status where Tasks.ID =
> Categories.ID AND Tasks.ID = Status.ID'

> > I would like to select all the records in the tasks table,
> > the result however should contain the values from the
> > Categories and Status table. I hope this makes sense.







More information about the thelist mailing list