Hi, I've never done this(REGEX) using MYSQL before so bare with me
I have the following simple query.
Code:
$query = "UPDATE #__jt_banners SET
impressions = impressions + 1
WHERE id = '$id'";
It tallies each visiting user as an impression, however i need to first compare his/her "user agent" against a database of known search engine bots, etc.
In addition, I have a separate table which stores C class IP Addresses in the following format "72.14.199"
Returning the IP address and User agent is simple enough through PHP.
How can I then rewrite the query so that it first checks to make sure that these values don't match any within our database.
structure:
jos_jt_userAgents:
int "id"
text "user_agent"
text "description"
text "link"
jos_jt_ip_addresses
int "id"
var_char(45) "search_engine"
var_char(45) "ip_address"
text "description"
jos_jt_banners
int "impressions"
bllahblahablahlah