Jump to content
TNG Community
Appelmus

automatic input in many records

Recommended Posts

Appelmus

Hello!
In over 7000 records are very many married couples where the marriage field is empty. Is there an automated way to put a capital Y in the empty marriage field or do I have to do it all by hand?screenshot_324.png

Share this post


Link to post
Share on other sites
theKiwi

You could do this in phpMyAdmin pretty easily I think - open up the tng_families table , and run a query on it of the form

update tng_families set marrdate = "Y" where marrdate = ""

or something like that (Not sure that's correct syntax. You can probably also do it in a Report in TNG Admin.

Make a backup of that table first!

Roger

Share this post


Link to post
Share on other sites
Appelmus

Thank you very much, I will try! 

Share this post


Link to post
Share on other sites
Rob Roy

Appelmus, let us know if it works.  Would save me a lot of work as well.

Share this post


Link to post
Share on other sites
Rob Severijns

Appelmus,

This could lead to potential conflicts with mods that calulate with dates like Age at marriage or Age at event made by @Michel KIRSCH

Not enttrely sure about that though.

Rob

Share this post


Link to post
Share on other sites
theKiwi
1 hour ago, Rob Severijns said:

This could lead to potential conflicts with mods that calulate with dates like Age at marriage or Age at event made by @Michel KIRSCH

Not enttrely sure about that though.

I'm pretty sure Y is a valid entry in the Date field of an event, so any Mods that try and do calculations on the date field are already accounting for the possible presence of Y anyhow. It would depend what value is expected in the marrdatetr field. In my database for people who I've given a death date of "?", their marrdatetr is 000-00-00 which is an invalid date, so will be ignored.

Roger

Share this post


Link to post
Share on other sites
Appelmus

Hello!
The solution that thekiwi has formulated works. Thanks again for that.
My experience in detail:
I opened the database of my test site with phpMyadim and selected the tng_families there. The partial database was displayed. In the upper menu bar I selected SQL and selected UPDATE from the various options in the input window. I then copied the query into the input window.
Everything else is self-explanatory.

 

PS

Also works on the live website

Share this post


Link to post
Share on other sites
Michel KIRSCH
On 1/21/2022 at 8:30 PM, Rob Severijns said:

This could lead to potential conflicts with mods that calulate with dates

No problem for me.

Michel

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

×