Newbies otahak Posted October 19, 2010 Newbies Posted October 19, 2010 Hey Guys, I'm an amateur so if my question isn't phrased properly or I don't use adequate terminology please forgive me. They want me to make a script that will check if a specific user-group (defined by an "is=1/0" field in the user records) and message those that have orders that require attention. "Orders" includes a "salesperson" field that's the same as "user_name" in "Users". I'm going a bit cross eyed just describing it so again sorry for any misunderstanding. Any help is greatly appreciated.
Ted S Posted October 19, 2010 Posted October 19, 2010 I'm having a hard time understanding the question. You have a table of orders. One of the fields contains the sales person's name and another field contains something that a follow-up is needed. You want to send a message -- email I presume -- to those sales persons with orders that need to be followed-up. I assume you have two tables. One for orders, one for users. Does your order table contain the name of the sales person or an just ID for the sales person which is located in the user table? What exactly is in the field that indicates that a follow-up is needed?
Newbies otahak Posted October 19, 2010 Author Newbies Posted October 19, 2010 Thanks for your time and sorry again for my confusing question. Yes, there are two tables. One contains orders, with a field for the sales rep ("salesrep"). The second table contains all employees, but designates sales reps with a "is_salesrep= 1 or 0". There is a "user_name" field as well in this 2nd table. My end result (ideally) would have the script go rep by rep (from "users" table), finding their orders (in "orders" table) and sending a message to the corresponding rep. As for what's in the field...? Just names, with the exception of "is_salesrep" in "users".
Recommended Posts
This topic is 5147 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now