Jump to content

compare table data and run script


dropbop

Recommended Posts

Hi,

 

I have a database (mysql). In the database is a table with categories (categories_id, categories_name etc).

 

I also have another table (products table) which gets filled using a html form. That table holds category info too.

 

What I am trying to do (without any luck) is when the form is processed, it will populate the table with the new data, then I need it to compare the 2 tables to see if the category fields from both tables have a match. If there is a match in the tables then send an email to people who has asked to be notified when new product has been added that matches a particular criteria.

 

For example, if someone adds a product to the category 'Landscapers', with a location 'Dorset'... I would like to be able to email all the registered tradespeople in Dorset about the new product.

 

I know this should be something quite simple, but I cant seem to get my head around it. Any pointers would be fantastic.

 

Many thanks

 

DB

 

 

Link to comment
Share on other sites

let's see what code you have so far.

 

I have actually linked my mysql database to MSaccess for now where I can design the queries visually, and maybe even be able to create a cron in windows to send the emails....  This will also give me a sort of 'hard copy' to work from when I do get the time to properly code this feature into the project.

 

Although, this will be just temporary to get me going for now so I can move on a bit further with my project. I will come back to it at a later stage, but at the moment I need to move on and this feature i think would take too much time.

 

Thanks for the reply anyway, much appreciated :)

 

DB

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.