[thelist] MySQL query help

Kevin lists at irubin.com
Sun Jun 9 01:18: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


Thanks for the reply, however I can't get it just right.

The query (modified a bit to reflect real column names) returns only two
rows out of an expected 5. Any thoughts?


SELECT Tasks.ID, Tasks.CatID, Tasks.ID, taskcategory.ID,
taskcategory.Task, taskstatus.ID, taskstatus.TStatus FROM Tasks,
taskcategory, taskstatus WHERE Tasks.ID = taskcategory.ID AND Tasks.ID =
taskstatus.ID

Thanks again.

--Kevin
lists at irubin.com






More information about the thelist mailing list