0

Hi all i am developing an online website where teachers can register and then they can upload their courses. I am gathering teacher's following data in my website:

  1. BASIC INFO Like Course title and introduction
  2. Professor experience and single relevant document in PDF
  3. Catalog (Here teacher can add multiple catalog images ) and many other things

Now after all the data gathering i am displaying all the information of the curses on courses page gathering data from different tables from DB using joins now i want to achieve that one catalog image should be display on each and every course instead of showing all catalog images

My Code is:

    cource::connection();
    $this -> query = mysqli_query($this -> connection, "
        select course_offerings.courseID, course_offerings.email, course_offerings.course_title, fee.courseID, fee.email, fee.monthly, catalog.catalog, catalog.courseID, catalog.email 
        from course_offerings 
        INNER JOIN fee  
        INNER JOIN catalog 
        on course_offerings.courseID=fee.courseID 
            and course_offerings.email='$email' 
            and fee.email='$email' 
            and catalog.email='$email'");
    if(mysqli_num_rows($this -> query) > 0) {
        echo "Found";
    }
    else {
        echo "Not";
    }
Barmar
  • 741,623
  • 53
  • 500
  • 612

0 Answers0