I created a table called movies with fields such as genre, rating as text field.
I then decided that it would be better practice to create a table for each. So to save time I developed a query to change the text genre into an id.
Below is my movie table.
vidName text
release year(4)
description text
fk_hirePeriod tinyint(4)
fk_genre text
fk_rating tinytext(4)
fk_type text
available tinyint(4)
picture text
movieID tinyint(4)
Below is my genre table
id tinyint(4)
genre tinytext
I ran this query on the database
UPDATE movies SET movies.fk_genre = genre.id WHERE movies.fk_genre = genre.genre;
It comes up with the error "MySQL said: Unknown table 'genre' in where clause"
Any help would be appreciated, thanks!!!!