Wrox Programmer Forums
|
BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6
This is the forum to discuss the Wrox book Beginning PHP, Apache, MySQLWeb Development by Michael K. Glass, Yann Le Scouarnec, Elizabeth Naramore, Gary Mailer, Jeremy Stolz, Jason Gerner; ISBN: 9780764557446
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 28th, 2006, 03:21 PM
Registered User
 
Join Date: Mar 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default chapter6.mysql

OK, this file isn't included in the downloaded code. I think a beginner book should be a little more descriptive too. They say "go in to phpMyAdmin and make create a new database". Like I said, not a lot of info for a beginner book. I've never done anything through phpMyAdmin, so I guess I'll have to wing it. That is if I find the code and it works.

Also, when it says to create a new mysql database named "moviesite". I already have one with the same name from chapter 3. I would assume I need to give it a different name, but (knowing my luck) it'll mess up everything for the remainder of the book.

I don't feel like this book has a lot of continuity, but I guess that's what happens when there are 5 authors.


 
Old May 28th, 2006, 08:01 PM
Authorized User
 
Join Date: May 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Beebs
Default

I'm with you mikezile.

Your post is dated 03/28/2006 : 2:21:22 PM, but still there's no answer - very appaling support.

So again, where is the chapter6.mysql. Yes I have dowloaded the code, and it's not there

 
Old May 31st, 2006, 12:09 PM
Registered User
 
Join Date: Dec 2004
Posts: 9
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi

I searched here on this forum for chapter6.mysql and found it completely written in another post. Here you go:
X-------------------------
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);

Best Regards,
Hanne B. Stegemüller - Denmark
The Following User Says Thank You to Hanne B. Stegemueller For This Useful Post:
 
Old June 30th, 2006, 12:14 AM
Registered User
 
Join Date: Jun 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks to Hanne B. Stegemueller. Otherwise I couldn't find the code.

It takes me some time to figure out how to use the code though.

The book should've wrote more about it.
 
Old September 3rd, 2006, 11:38 AM
Registered User
 
Join Date: Sep 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

That code can be found in chapter 3, pages 94 through 96 where the ground work for the moviesite is first laid.

TG^2

 
Old September 13th, 2006, 04:49 AM
Registered User
 
Join Date: Sep 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

But in that way we can make to interact it? We must add the code to index.php?

 
Old September 13th, 2006, 11:18 AM
Registered User
 
Join Date: Sep 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Maybe i must use mysql fuction^^"?

Tano
 
Old September 13th, 2006, 01:21 PM
Registered User
 
Join Date: Jun 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You need to go to phpMyAdmin, create a database, click on the SQL button to run SQL script, copy and past the code in the text area, then run the script.
 
Old December 21st, 2007, 07:34 AM
Registered User
 
Join Date: Dec 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Alternatively, if this is the almost same database we created in earlier chapters (which tgsqrd points out) then why bother telling us to create a new database at all? Why not just re-use the one we already have?

There'd be some benefit in getting the readers to run the odd UPDATE to change a couple of 1's to zeros instead of recreating a database that exists already with the same name and leaving the user to figure out how to resolve that conundrum.

I think there's a good case for these types of books to be proofed by someone in the target audience before being released; there are many syntax errors and inconsistencies that I've had to work out already and I'm only in chapter 6. Not impressed.






Similar Threads
Thread Thread Starter Forum Replies Last Post
chapter6.1.3 :Data Reader Source johe BOOK: Professional SQL Server 2005 Integration Services ISBN: 0-7645-8435-9 0 November 28th, 2008 04:35 AM
Page 164 - Where is "chapter6,mysql"? Kevin Tough BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 July 9th, 2007 03:37 PM
Chapter6 delete.php ghitar1 BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 5 September 2nd, 2006 12:21 PM
Stock at page 166 DB chapter6 gastoncs PHP How-To 1 November 6th, 2005 08:07 PM
Chapter6-Text Editor App Appled BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 3 March 9th, 2005 06:57 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.