Forum Moderators: coopster
Currently I'm building an app where admins can post entries to the database describing available shipments. The data looks like this:
ShipID ¦ StartState ¦ StartCity ¦ EndState ¦ EndCity ¦ Equip
------------------------------------------------------------
1 ¦ FL ¦ Tampa ¦ CA ¦ Los Ang.¦ Truck
2 ¦ AL ¦ OZARK ¦ OH ¦ Akron ¦ Truck
Then users who might want to move the load can search by any variable and save their searches as alerts based on any item they want. So they might want to search all loads coming from florida, regardless of any other criteria. That data might look like this
AlertID ¦ StartState ¦ StartCity ¦ EndState ¦ EndCity ¦Equip
-------------------------------------------------------------
1 ¦ ¦ ¦ CA ¦ ¦Truck
2 ¦ FL ¦ ¦ ¦ ¦
What I am having a hard time with is when an admin posts a new shipment into the first table, I want it to show all corresponding alerts. Basically, if a value is present in the alert table, it must match the value being posted in the shipment table. It would be easy if the Alerts had every field filled in, then matching would be easy, but matching only on the present values in Alerts is making it difficult.
For some reason I am stuck on this and would appreciate any help.
Thanks!