On 4/9/06, David Doonan <dadoonan@xxxxxxxxxxxx> wrote: > I'm having trouble getting the correct results on a list page. > > The first query is pulling the name of active authors from the d/b > and linking to a list page that is supposed to return essay titles by > the requested author. The list page however is displaying essay > titles by all authors. > --------------------- > List page query = > > $query_GetAuthorList = "SELECT Writings.Writings_Author, > Writings.Writings_Title, DATE_FORMAT(Writings_Date, '%M %D, %Y') as > Writings_Date, Writings.Writings_Text, Writings.ID, > Author.Autholr_Name, Author.ID FROM Writings, Author > WHERE Writings.ID = Writings.ID AND > Author.Autholr_Name = Writings.Writings_Author AND > Author.ID = Author.ID > ORDER BY Writings.Writings_Date desc"; What happens when you run that through phpmyadmin or mysql? Does it give you the right results? You are right, the query seems to be stuffed - you have the tables joining to themselves (author.id=author.id) What do the tables look like? describe writings; describe author; -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php