Eloi on 05/05/09
Last Edited at 05/05/09 10:26am
Create Table Sessions ( session_id INT UNSIGNED NOT NULL AUTOINCREMENT, ip_address INT UNSIGNED NOT NULL, session_data TEXT NOT NULL, PRIMARY KEY (session_id), INDEX (ip_address)) ENGINE=InnoDB // Insert a new dummy recordINSERT INTO Sessions VALUES (NULL, INET_ATON('192.168.0.2'), 'some session data'); //Find all sessions coming from a local subnetSELECT sessin_id, ip_address as ip_raw, INET_NTOA(ip_address) as ip, session_dataFROM SessionsWHERE ip_addressBETWEEN INET_ATON('192.168.0.1')AND INET_ATON('192.168.0.255')
Report this snippet Tweet
Comment:
You need to login to post a comment.