. */ if ( !class_exists('GiglogAdmin_Concert') ) { class GiglogAdmin_Concert { public static function create($band, $venue, $date, $ticketlink, $eventlink) { global $wpdb; $wpdb->insert('wpg_concerts', array( 'band' => $band, 'venue' => $venue, 'wpgconcert_date' => $date, 'wpgconcert_tickets' => $ticketlink, 'wpgconcert_event' => $eventlink )); return $wpdb->insert_id; } public static function get($band, $venue, $date) { global $wpdb; $sql = 'SELECT id from wpg_concerts' . ' where band = ' . $band . ' and venue = ' . $venue . ' and wpgconcert_date ="' . $date . '"'; return $wpdb->get_results($sql); } } }