Here is a sample of the table I have:
meta_id | post_id | meta_key | meta_value
1 | 1001 | Name | Jack
2 | 1002 | Name | John
3 | 1001 | Description | Jack is 36 years old
4 | 1002 | Description | John is Jack's brother
Want to find meta_value where meta_key is "Name" in meta_value where meta-key is "Description" and replace it by adding the post_id. E.g. searching for "Jack" in meta_value where meta_key is "Description" and replace it with "Jack (post_id = 1001)".
So the result would be like this:
meta_id | post_id | meta_key | meta_value
1 | 1001 | Name | Jack
2 | 1002 | Name | John
3 | 1001 | Description | Jack (post_id = 1001) is 36 years old
4 | 1002 | Description | John (post_id = 1002) is Jack (post_id = 1001)'s brother
Just so you know the table has millions records. Any help would be much appreciated, cheers!