Assume two tables:

CREATE TABLE block_ip (
  datestamp int(11) NOT NULL default '0',
  remote_addr char(15) NOT NULL default '',
  PRIMARY KEY  (remote_addr),
  KEY datestamp (datestamp)
) TYPE=MyISAM;

CREATE TABLE brute_force (
  datestamp int(11) NOT NULL default '0',
  remote_addr char(15) NOT NULL default '',
  remote_user char(35) NOT NULL default '',
  KEY remote_addr (remote_addr),
  KEY datestamp (datestamp),
  KEY remote_user (remote_user)
) TYPE=MyISAM;

Contents of the 'brute_force' table (remote_addr):

1.2.3.4
2.3.4.5
3.4.5.6
4.5.6.7
5.6.7.8
6.7.8.9

Contents of the 'block_ip' table (remote_addr):

2.3.4.5
4.5.6.7

Can someone help me with the query that will select all the
'remote_addr' rows from 'brute_force' that are NOT in the 'block_ip'
table?

Something like:

select brute_force.* from brute_force, block_ip where
brute_force.remote_addr != block_ip.remote_addr

maybe?  I have a feeling it's some sort of left join, and I was never
very good at those.  :-/



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to