One or more of the variables being inserted has no values (this is
different from having 1 empty value), and an INSERT statement requires
all the parameters to have values. (A SELECT does not; this is used
in combination with $null to dynamically alter the query. See the
Vortex manual,
http://www.thunderstone.com/vortexman/node36.html.)
Since you've checked that $query is non-empty before this insert, it's
possible that $REMOTE_HOST isn't being set by the web server. Just
before the insert, add the following:
<if $REMOTE_HOST eq ""><$REMOTE_HOST = $REMOTE_ADDR></if>
<if $REMOTE_HOST eq ""><$REMOTE_HOST = "Unknown"></if>
to ensure that $REMOTE_HOST is set to some value. You can also try
setting <$null = > to pass no-value variables as empty strings.
-Kai