close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

I want to filter a recordset by a deabasket variable

Thread began 1/03/2014 3:29 am by John Langer | Last modified 1/09/2014 10:00 am by John Langer | 2043 views | 13 replies

John LangerBeta Tester

Hi Jason,

I need to pick your brains a little if I may. What I thought was a simple matter is proving a bit difficult for me.

Let me explain what the site is about and what I'm trying to do.

It's a teaching site (for a client) that sells online courses. The owner writes courses but there are also other course writers (teachers). The courses are for sale and I've used eCart 5 to construct this.

The "students" are allowed to buy more than one course at once (sometimes they are buyiig as many as 12) and each course has up to three teachers. The Teachers are just listed in the "users" table under the "UserGroups" field. This is held as an integer with a relationship to the UserGroups table.

We only know for sure when a course is sold when the "confirm payment" button is pressed on the "pp_confirm.php" page. At the moment that triggers an email (via UE) to a static email address (the owner of the site). That email lists ALL the courses sold.

What I'm trying to do is also either send that email or a new email to the teacher(s) of a course.

Supposing we have three teachers and three courses. On one PayPal payment transaction "Student A" buys three courses.

Course 1's teacher is Fred
Course 2's teacher is Fred and Ginger
Course 3's teacher is George

The course table has three fields "courseTeacher1", "courseTeacher2" and "courseTeacher3" These are populated from a list drawn from the users table filtered buy UserGroup (either 1-Administrator or 2-Teacher)..

So an email to is sent to Fred saying that his course 1 and course 2 has been sold to Student A
An email is sent to Ginger saying that her course 2 has been sold to Student A
And finally an email is sent to George saying that his course 3 has been sold to Student A (what the teachers then do is compile a monthly invoice based on this info and send to site owner for a percentage of the course fee).

On another occasion it might be only one course sold with one teacher or 12 courses sold with six teachers spead amongst them etc.

With your help (see the original query I made at the start of this thread) I can get the course ID('s) from the database but when I try to match the teachers to the courses and get an email to send with the info I'm lost.

Can you point me in the right direction on what is to me a very complicated issue. Perhaps I'm just going about it the wrong way.

Many thanks

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...