SQL to Check the Season Box in Player Profile
-
Updating the Player Details have become a dreadful task. So I went to mySQL database to see how things are stored. Yikes! No fault to SportsPress but WordPress makes this thing messy.
I discovered how to automatically add a new season to existing player profiles (because you can’t add existing player details using import) using the table wp_term_relationships
It’s setup with 3 simple columns
object_id term_taxonomy_id term_order
where
object_id is the wordpress post # for the player
and term_taxonomy_id is the post ID# for the season
term_order is always 0
so I created a csv file, loaded it and boom – All players on the list had the new season.Question:
How do I perform a similar action to check the new season box in their profile, whether an SQL statement or csv file. I can’t figure out what the box is associated with.
https://snag.gy/68m1s3I see there is another table called wp_postmeta that houses alot of the details and associations for things like current team, past team etc.
example from table:
meta_id post_id meta_key meta_value
unique id player post id# sp_current_team team post id#
But for the life of me, i can’t figure out how to check the season box.
what’s the meta_key and meta_value for the box
or SQL statement to run?
Help!!!
- The topic ‘SQL to Check the Season Box in Player Profile’ is closed to new replies.