I'm developing a system for a client that is used to arrange the swap and rental of holiday homes.
I need to implement a cron job that runs through new properties (based in 3 tables, one for homes, boats and caravans) and e-mail's users who have expressed an interest in the property type and location.
I have a little psuedo-code, i'm just wondering if this is an efficient way to do it?
Code: Select all
For each property type
{
For each new property in property_table (selected based on date)
{
Find members in members database with matching type and country preferences
If the member isn't already in the temporary table
{
add match details temporary table and add link to the property
} else {
add a link to the existing record
}
}
}
Run through each item in the temporary table and e-mail the information to the memberI intend to e-mail using PHPmailer and I am working with PHP4.