add_action( ‘cptslotsb_process_data’, ‘new_appointent’, 11, 1 );
function new_appointment($params){
global $wpdb;
$wpdb->insert(‘testbookinghook’, array(‘id’ => ’22’));
// do stuff here,
// $params is an associative array with the booking data
}
This code is not inserting id = 22 into the database table ‘testbookinghook’.
Can you help me with what is wrong? Can you show some example code?
Note: the table has only one column with no primary key.