Displaying 1 result from an estimated 1 matches for "movie_files".
Did you mean:
move_files
2006 Dec 13
6
triggering a query within a loop
...this is
the site: http://www.walkenclips.com/
It''s one page that basically does this:
Query the db to get a list of movies (movies table)
Loop through the movies and output each movie to the browser
Query the db within the loop to get files names of movie quotes from
that specific movie (movie_files table)
Loop through the movie quote names and output each quote to the browser
Continue to the next movie, rinse and repeat till the end of the loop
I''m able to display the the movies fine with the following code:
Controller:
class HomeController < ApplicationController
def index...