• Resolved daveporter

    (@daveporter)


    Hi everyone,

    I just read the docs on creating a table with plugins and all seems fairly straight forward.

    But one thing that I did not quite understand is the version option.

    A version variable is added:
    add_option(“jal_db_version”,”1.0″);

    But I don’t get what that does – where is the 1.0 value stored ?

    In the next example it is checked via:
    $installed_ver = get_option( “jal_db_version” );
    if( $installed_ver != $jal_db_version ) {
    etc….
    }
    If anyone could explain this I would much appreciate it.
    Thanks, Dave

Viewing 1 replies (of 1 total)
  • Thread Starter daveporter

    (@daveporter)

    Oops, sorry should have looked up what add_option & get_option do first !

    For those following who may also be wondering, these options add a ‘named option/value pair’ to the options table.

    This value can then be interrogated in the future for whatever use it servers.

    cheers Dave

Viewing 1 replies (of 1 total)
  • The topic ‘creating tables with plugins docs’ is closed to new replies.