function edit_theme($id) { global $wpdb; if (!$id) { $id = $wpdb->get_var("SELECT MAX( id ) FROM " . $wpdb->prefix . "Spider_Video_Player_theme"); } $query = $wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "Spider_Video_Player_theme WHERE `id`=%d", $id); $row = $wpdb->get_row($query); // load the row from the db table // display function html_edit_theme($row, $id); }
function edit_theme($id) { global $wpdb; $row = $wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "formmaker_themes WHERE id='" . $id . "'"); html_edit_theme($row, $id); }