SELECT 
 * 

FROM 
 `visit`
 
WHERE 
 NOT( ( `ip` IS NULL ) OR ( `ip` = '' ) )
 
ORDER BY
 `updated` ASC