I'm getting lots of draft submissions which are showing up in the MySQL views. I've added a NOT condition to the query to account for this. The new query now reads:
$query = "CREATE OR REPLACE VIEW {".$view_name."} AS SELECT parent.sid, s.uid,"
. $components
." FROM_UNIXTIME(s.submitted) AS submitted, s.remote_addr FROM {webform_submitted_data} AS parent JOIN {webform_submissions} s ON s.sid = parent.sid WHERE parent.nid = "
. $nid
." AND NOT s.is_draft = 1 GROUP BY parent.sid ORDER BY parent.sid DESC";
return $query;
Hopefully this is of use to others.
| Comment | File | Size | Author |
|---|---|---|---|
| removedraft-webform_mysql_views.patch | 643 bytes | benedictsteele |