• Resolved steve49589

    (@steve49589)


    Can you let me know what table the information is written to? (The stuff that is in the tables)

    I’ve got a lot of tables on one of my sites, and I’m trying to search for text within the tables to find a specific word or phrase reference. I’m trying to use the regular search, but wanted to take it one step further and search through the DB using PHPmyAdmin.

    Then again, maybe it’s not written to the database?

    http://wordpress.org/extend/plugins/wp-table-reloaded/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    WP-Table Reloaded stores its data in the “wp_options” database table, by using the WordPress Options API. The entries are named like “wp_table_reloaded_data_…”.
    You should find it with PHPMyAdmin easily.

    However, note: Making changes to these data fields directly is strongly not recommended! Due to the interal data format in WordPress Options, this will corrupt the tables!

    Regards,
    Tobias

    Thread Starter steve49589

    (@steve49589)

    Thank you. I was not planning to make any changes to the production database, just search through the data to locate a specific word/phrase.

    Thanks again.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    ah, ok. That should be fine then, and you can find the entries in the way I described.

    Best wishes,
    Tobias

    If I can ask a follow up question on this.

    Is it easy to query values from the table values stored in wp_options?

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    bad news here unfortunately: As tables are not directly stored as SQL, it is not possibly to query WP-Table Reloaded tables. Sorry 🙁

    Regards,
    Tobias

    I managed to find a workaround.

    Using the Get Options plugin (http://wordpress.org/extend/plugins/get-options), I was able to see how the data is serialized into the database.

    Then using WordPress’ built-in get_option function, I was able to extract the information I needed:

    $userList = get_option('wp_table_reloaded_data_1');
    
    for ( $counter = 0; $counter <=200; $counter += 1 ) {
    	if ( strtolower($userList[data][$counter][2]) == $playername ) {
    		//do something here
    		}
    }

    wp_table_reloaded_data_1 corresponds to the id of the table
    counter <=200 is the maximum number of rows that may be in the table
    [data] is the name of the array
    [$counter] is the row
    [2] is the column

    Probably could be done more efficiently but serves my purpose for a small table.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for sharing this solution! While there’s no “API” for this, this is indeed the best way to achieve this.

    Best wishes,
    Tobias

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: WP-Table Reloaded] Database Content Location?’ is closed to new replies.