Jump to content
TNG Community
Sign in to follow this  

SQL error in showphoto.php

Recommended Posts


I am experiencing a display problem when a photo link on an individual page is called.

Immediately after the photo is displayed on the page, I am get the following:

Cannot execute query: SELECT photolinks.ID, photolinks.personID as personID, people.living as living, people.branch as branch, families.branch as fbranch, families.living as fliving, people.lastname as lastname, people.lnprefix as lnprefix, people.firstname as firstname, people.suffix as suffix, nameorder, altdescription, altnotes, photolinks.gedcom, familyID, people.personID as personID2, wifepeople.personID as wpersonID, wifepeople.firstname as wfirstname, wifepeople.lnprefix as wlnprefix, wifepeople.lastname as wlastname, wifepeople.suffix as wsuffix, husbpeople.personID as hpersonID, husbpeople.firstname as hfirstname, husbpeople.lnprefix as hlnprefix, husbpeople.lastname as hlastname, husbpeople.suffix as hsuffix FROM photolinks LEFT JOIN people AS people ON photolinks.personID = people.personID AND photolinks.gedcom = people.gedcom LEFT JOIN families ON photolinks.personID = families.familyID AND photolinks.gedcom = families.gedcom LEFT JOIN people AS husbpeople ON families.husband = husbpeople.personID AND families.gedcom = husbpeople.gedcom LEFT JOIN people AS wifepeople ON families.wife = wifepeople.personID AND families.gedcom = wifepeople.gedcom WHERE photoID = "36" ORDER BY lastname, lnprefix, firstname, hlastname, hlnprefix, hfirstname


Running this query directly in phpMyAdmin the following message is given:

MySQL said:

#1052 - Column: 'nameorder' in field list is ambiguous


MySQL version 4.0.20-standard

It first appeared when I updated to 4.1.0 from 4.0.7. I did a complete new install of 4.1.0 using a 4.0.7 GEDCOM backup and still have the problem from the first photo import.


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this