Using wp_list_table how to trigger update function "inline"?
Ok, i have used wp_list_table to read data from a custom db table and i like to be able to update the database table by clicking the correspondig cell. Defaults are 0 and when clicked the value is set to 1.
so by clicking the cell updateVisitor() will be triggered "inline"
my function which i isn't part of the Visitors extend WP_list_table class
function updateVisitor($id){
global $wpdb;
$query = $wpdb-prepare( "UPDATE tbl_visitor SET visitorPayed =BINARY(visitorPayed=1) WHERE visitorID = %d", intval($id) );
$result = $wpdb-query( $query );
}
Topic wp-list-table query Wordpress
Category Web