Reply To: Database Error (front.php) [Column count doesn't match value count at row 1]


I was able to debug your script. You failed to include all the data elements. This is the script that works!!!!

$wpdb->query( $wpdb->prepare(“INSERT INTO “.$wpdb->prefix .”reservations(name, email, arrival, departure, room, number, childs, country, custom, customp, reservated, user, approve, roomnumber, price )
VALUES (%s, %s, %s, %s, %d, %d, %d, %s, %s, %s, NOW(),%d, %s, %s, %s )”, $val_name, $val_email, $val_fromdate_sql, $val_todate_sql, $val_room, $val_persons, $val_childs, $val_country, $val_custom, $val_customp, 0, ” “, “”, “0.00” ) );