|
Subject:
|
Missing .sql script
|
|
Posted By:
|
mzindler19
|
Post Date:
|
4/12/2004 4:39:04 PM
|
In chapter 6 page 164. Creating a new database in phpMyAdmin named chapter6,that part worded fine. But I can not find the chapter6.sql script to populate the db. Maybe I'm missing something. Could someone point me in the right direction. Thanks.
|
|
Reply By:
|
xumuskiefan
|
Reply Date:
|
4/14/2004 10:38:20 AM
|
We are looking into this issue and hope to post a resolution soon.
XUMUSKIEFAN Wrox Moderator
|
|
Reply By:
|
karniv0re
|
Reply Date:
|
4/28/2004 8:14:30 PM
|
Preferrably sooner than later.
|
|
Reply By:
|
daddyjackpot
|
Reply Date:
|
5/18/2004 5:19:04 PM
|
did anyone learn anything about this missing script? i have just hit this page and also don't know this is...
|
|
Reply By:
|
keiran
|
Reply Date:
|
5/19/2004 2:38:38 PM
|
I have been messing about with this one and I think I have the answer.
Ignore the instruction to create a new database called chapter6 and forget about chapter6.mysql.
In the script index.php make the following changes:
Change line 2: $link = mysql_connect("localhost", "root", "")
to: $link = mysql_connect("localhost","root","mysqlpass")
and
line 4: mysql_select_db('chapter6', $link) or die ( mysql_error());
to: mysql_select_db('wiley', $link) or die ( mysql_error());
and away you go!
|
|
Reply By:
|
BuzzLY
|
Reply Date:
|
5/28/2004 1:26:24 PM
|
I apologize that this was not posted earlier. Here is the code you need for chater6.mysql:
CREATE TABLE `movie` ( `movie_id` int(11) NOT NULL auto_increment, `movie_name` varchar(255) NOT NULL default '', `movie_type` tinyint(2) NOT NULL default '0', `movie_year` int(4) NOT NULL default '0', `movie_leadactor` int(11) NOT NULL default '0', `movie_director` int(11) NOT NULL default '0', PRIMARY KEY (`movie_id`), KEY `movie_type` (`movie_type`,`movie_year`) ) TYPE=MyISAM PACK_KEYS=0 AUTO_INCREMENT=4 ;
INSERT INTO `movie` VALUES (1, 'Bruce Almighty', 5, 2003, 1, 2); INSERT INTO `movie` VALUES (3, 'Grand Canyon', 2, 1991, 4, 3); INSERT INTO `movie` VALUES (2, 'Office Space', 5, 1999, 5, 6);
CREATE TABLE `movietype` ( `movietype_id` int(11) NOT NULL auto_increment, `movietype_label` varchar(100) NOT NULL default '', PRIMARY KEY (`movietype_id`) ) TYPE=MyISAM AUTO_INCREMENT=9 ;
INSERT INTO `movietype` VALUES (1, 'Sci-Fi'); INSERT INTO `movietype` VALUES (2, 'Drama'); INSERT INTO `movietype` VALUES (3, 'Adventure'); INSERT INTO `movietype` VALUES (4, 'War'); INSERT INTO `movietype` VALUES (5, 'Comedy'); INSERT INTO `movietype` VALUES (6, 'Horror'); INSERT INTO `movietype` VALUES (7, 'Action'); INSERT INTO `movietype` VALUES (8, 'Kids');
CREATE TABLE `people` ( `people_id` int(11) NOT NULL auto_increment, `people_fullname` varchar(255) NOT NULL default '', `people_isactor` tinyint(1) NOT NULL default '0', `people_isdirector` tinyint(1) NOT NULL default '0', PRIMARY KEY (`people_id`) ) TYPE=MyISAM PACK_KEYS=0 AUTO_INCREMENT=7 ;
INSERT INTO `people` VALUES (1, 'Jim Carrey', 1, 0); INSERT INTO `people` VALUES (2, 'Tom Shadyac', 0, 1); INSERT INTO `people` VALUES (3, 'Lawrence Kasdan', 0, 0); INSERT INTO `people` VALUES (4, 'Kevin Kline', 1, 0); INSERT INTO `people` VALUES (5, 'Ron Livingston', 0, 0); INSERT INTO `people` VALUES (6, 'Mike Judge', 0, 0);
|
|
Reply By:
|
rob63082
|
Reply Date:
|
4/19/2008 6:21:43 PM
|
Can anyone help me. I cant figure out how to get my phpadmin program to open. I cant find the shortcut for it.
|
|
Reply By:
|
rob63082
|
Reply Date:
|
4/19/2008 9:27:41 PM
|
never mind. i got it figured out.
Robbie
|