EModal_Model_Modal_Meta::save()
Contents
Description Description
Source Source
File: includes/importer/easy-modal-v2/model/modal/meta.php
public function save() { global $wpdb; $table_name = $wpdb->prefix . $this->_table_name; $rows = $wpdb->get_col( "SELECT id FROM $table_name WHERE modal_id = $this->modal_id ORDER BY id DESC" ); if ( count( $rows ) ) { $this->id = $rows[0]; $wpdb->update( $table_name, $this->serialized_values(), array( 'id' => $this->id ) ); } else { $wpdb->insert( $table_name, $this->serialized_values() ); $this->id = $wpdb->insert_id; } }
Expand full source code Collapse full source code View on Trac