Michael T. Jones Posted May 19, 2022 Report Share Posted May 19, 2022 I'm working on tweaking @Bill Herndon's Citation Master mod to incorporate the repository table website address field. I did contact him recently, but I'm thinking he is away from TNG at the moment as I haven't heard back. I can create an SQL query in phpmyadmin that shows the information I'm looking for, but in the Citation Master mod, it looks like the SQL is buried in some PHP functions and I get the following error: Query: SELECT sourceID, title, reponame, tng_sources.repoID as repoID, www, tng_repositories.addressID as addressID FROM tng_sources LEFT JOIN tng_repositories ON tng_sources.repoID = tng_repositories.repoID LEFT JOIN ON tng_repositories.addressID = .addressID AND tng_sources.gedcom = tng_repositories.gedcom WHERE tng_sources.sourceID = "S1" AND tng_sources.gedcom = "Jones" You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ON tng_repositories.addressID = .addressID AND tng_sources.gedc' at line 8 For some reason, it is dropping the tng_addresses table name before the addressID field name. Do any of you gurus have an idea on why that's happening? I've attached my modified citem_lib_citation.php file which I am experimenting with. Let me know if you have any ideas. Thanks! citem_lib_citation.php Quote Link to comment Share on other sites More sharing options...
bhemph Posted May 20, 2022 Report Share Posted May 20, 2022 Michael, You're going to kick yourself, but the variable is $address_table not $addresses_table. Remove the extra "es" and it runs just fine. Brent Quote Link to comment Share on other sites More sharing options...
Michael T. Jones Posted May 20, 2022 Author Report Share Posted May 20, 2022 Thank you, Brent! That cleared the error. A victory - however, I'm still not able to get the www field to show up in the preview field. I've tried adding www to the "standard fields" area and the "custom event fields" area, but neither seems to work for me - no SQL or php errors, just no affect. I'll keep playing around and see if I can have some success. Thanks! Quote Link to comment Share on other sites More sharing options...
Michael T. Jones Posted May 21, 2022 Author Report Share Posted May 21, 2022 I'm not exactly sure what changed, but I successfully did get www to show up now by adding it to the "8 supported standard fields" in the Citation Master citem_lib_citation.php file: if (isset($stdevent['www'])) $result['WWW'] = array("info" => $stdevent['www']); Thanks, again @bhemph Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.