October 19, 201015 yr Newbies 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.
October 19, 201015 yr 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?
October 19, 201015 yr Author Newbies 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".
Create an account or sign in to comment