Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 28th, 2006, 03:21 PM
Registered User
 
Join Date: Mar 2006
Location: , , .
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.


Reply With Quote
  #2 (permalink)  
Old May 28th, 2006, 08:01 PM
Authorized User
 
Join Date: May 2006
Location: , , Australia.
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

Reply With Quote
  #3 (permalink)  
Old May 31st, 2006, 12:09 PM
Registered User
 
Join Date: Dec 2004
Location: Vanloese, , Denmark.
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
Reply With Quote
The Following User Says Thank You to Hanne B. Stegemueller For This Useful Post:
  #4 (permalink)  
Old June 30th, 2006, 12:14 AM
Registered User
 
Join Date: Jun 2006
Location: , , .
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.
Reply With Quote
  #5 (permalink)  
Old September 3rd, 2006, 11:38 AM
Registered User
 
Join Date: Sep 2006
Location: Williamsburg, VA, USA.
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

Reply With Quote
  #6 (permalink)  
Old September 13th, 2006, 04:49 AM
Registered User
 
Join Date: Sep 2006
Location: , , .
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?

Reply With Quote
  #7 (permalink)  
Old September 13th, 2006, 11:18 AM
Registered User
 
Join Date: Sep 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Maybe i must use mysql fuction^^"?

Tano
Reply With Quote
  #8 (permalink)  
Old September 13th, 2006, 01:21 PM
Registered User
 
Join Date: Jun 2006
Location: , , .
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.
Reply With Quote
  #9 (permalink)  
Old December 21st, 2007, 07:34 AM
Registered User
 
Join Date: Dec 2007
Location: , , .
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.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 09:41 PM.


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