Changeset 3239433
Legend:
- Unmodified
- Added
- Removed
-
bookr/tags/1.0.0/includes/database/queries/appointment-queries.php
r3239202 r3239433 36 36 public function insertAppointment( $appointment ) { 37 37 try { 38 $customer_table = $this->wpdb->prefix . $this->tableAppointment;39 38 $customer_data = $this->wpdb->get_results( 40 39 $this->wpdb->prepare( 41 40 "SELECT id 42 FROM $ customer_table41 FROM $this->tableCustomer 43 42 WHERE firstname = %s 44 43 AND lastname = %s … … 64 63 ); 65 64 66 $customer_formats = array('%s', '%s', '%s','%s' , '%s');65 $customer_formats = array('%s', '%s', '%s','%s'); 67 66 68 67 // Insert the new customer 69 $this->wpdb->insert( $ customer_table, $customer_data, $customer_formats );68 $this->wpdb->insert( $this->tableCustomer, $customer_data, $customer_formats ); 70 69 71 70 $customer_id = $this->wpdb->insert_id; … … 88 87 89 88 // Insert the new appointment 90 $this->wpdb->insert( $this-> wpdb->prefix . $this->tableAppointment, $appointment_data, $appointment_formats );89 $this->wpdb->insert( $this->tableAppointment, $appointment_data, $appointment_formats ); 91 90 92 91 return $appointment_data; -
bookr/trunk/includes/database/queries/appointment-queries.php
r3239202 r3239433 36 36 public function insertAppointment( $appointment ) { 37 37 try { 38 $customer_table = $this->wpdb->prefix . $this->tableAppointment;39 38 $customer_data = $this->wpdb->get_results( 40 39 $this->wpdb->prepare( 41 40 "SELECT id 42 FROM $ customer_table41 FROM $this->tableCustomer 43 42 WHERE firstname = %s 44 43 AND lastname = %s … … 64 63 ); 65 64 66 $customer_formats = array('%s', '%s', '%s','%s' , '%s');65 $customer_formats = array('%s', '%s', '%s','%s'); 67 66 68 67 // Insert the new customer 69 $this->wpdb->insert( $ customer_table, $customer_data, $customer_formats );68 $this->wpdb->insert( $this->tableCustomer, $customer_data, $customer_formats ); 70 69 71 70 $customer_id = $this->wpdb->insert_id; … … 88 87 89 88 // Insert the new appointment 90 $this->wpdb->insert( $this-> wpdb->prefix . $this->tableAppointment, $appointment_data, $appointment_formats );89 $this->wpdb->insert( $this->tableAppointment, $appointment_data, $appointment_formats ); 91 90 92 91 return $appointment_data;
Note: See TracChangeset
for help on using the changeset viewer.