Note that there are some explanatory texts on larger screens.

plurals
  1. POMysql Query not receiving any data
    primarykey
    data
    text
    <p>Here's the query I'm trying to run it was working, but now for a reason I can't figure out its now given up.</p> <pre><code>SELECT films.movie_title, films.rating, films.actor, reviewed.review FROM films INNER JOIN reviewed ON films.movie_id=reviewed.review_id </code></pre> <p>While going through the tables I have come across this. Think this might be the problem.</p> <pre><code>ALTER TABLE `reviewed` ADD CONSTRAINT `reviewed_ibfk_1` FOREIGN KEY (`movie_id`) REFERENCES `films` (`movie_id`), ADD CONSTRAINT `reviewed_ibfk_2` FOREIGN KEY (`movie_id`) REFERENCES `films` (`movie_id`) ON DELETE CASCADE; -- -- Table structure for table `films` -- CREATE TABLE IF NOT EXISTS `films` ( `movie_id` int(4) NOT NULL AUTO_INCREMENT, `movie_title` varchar(100) NOT NULL, `actor` varchar(100) NOT NULL, `rating` varchar(20) NOT NULL, PRIMARY KEY (`movie_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=23 ; -- -- Dumping data for table `films` -- INSERT INTO `films` (`movie_id`, `movie_title`, `actor`, `rating`) VALUES (22, 'Batman Begins', 'Bale', 'Good'); -- -------------------------------------------------------- -- -- Table structure for table `reviewed` -- CREATE TABLE IF NOT EXISTS `reviewed` ( `review_id` int(4) NOT NULL AUTO_INCREMENT, `review` mediumtext NOT NULL, `movie_id` int(4) NOT NULL, PRIMARY KEY (`review_id`), KEY `movie_id` (`movie_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; -- -- Dumping data for table `reviewed` -- INSERT INTO `reviewed` (`review_id`, `review`, `movie_id`) VALUES (1, 'Really good film.', 22); -- ALTER TABLE `reviewed` ADD CONSTRAINT `reviewed_ibfk_1` FOREIGN KEY (`movie_id`) REFERENCES `films` (`movie_id`), ADD CONSTRAINT `reviewed_ibfk_2` FOREIGN KEY (`movie_id`) REFERENCES `films` (`movie_id`) ON DELETE CASCADE; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload