[thelist] SQL problem

Jay Blanchard jay.blanchard at niicommunications.com
Fri Aug 16 07:49:01 CDT 2002


[snip]
I want to display the results from a database that picks all the records
that match the primary key in another database and then displays them in
ascending order but I can't work out the right SQL statement. What I want is
something along the lines of...

("select * from FaveList where pkmatch =" &PKey "order by Product_ID asc:")
[/snip]

In another database, or table? I don't think that you have given us enough
info to solve the situation. Are there two tables, two table in two
databases, or something else? Can you describe the tables?

SELECT *
FROM FaveList f, OtherList o
WHERE f.Pkey = o.Pkey
ORDER BY f.Product_ID ASC

Jay

***********************************************************
* Texas PHP Developers Conf  Spring 2003                  *
* T Bar M Resort & Conference Center                      *
* New Braunfels, Texas                                    *
* San Antonio Area PHP Developers Group                   *
* Interested? Contact jay.blanchard at niicommunications.com *
***********************************************************





More information about the thelist mailing list