Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
| Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP 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
  #1 (permalink)  
Old March 17th, 2005, 02:10 PM
Registered User
 
Join Date: Mar 2005
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to elals
Default Problem with book Beginning PHP, Apache, Mysql WD

Beginning PHP, Apache, MySQL Web Development in cap 4 pag 134 , i can run consult data SQL in php, already I made several times and nonfunction in cap 4 please help me imcpy the errata code and nathing what happend....
 this the code

<?php
$link=mysql_connect("localhost","root","mials")or die(mysql_error());
mysql_select_db("wiley") or die (mysql_error());
$query = "SELECT
    movie_name,
    movie_director,
    movie_leadactor,
FROM
    movie";

$result=mysql_query($query,$query) or die(mysql_error());
$num_movies=mysql_num_rows($result);

$movie_header=<<<EOD
     <h2><center>Movie Review Database</center></h2>
     <table width='70%' border='1' cellpadding='2'
       cellspacing='2' align='center'>
          <tr>
               <th>Movie Title</th>
               <th>Year of Release</th>
               <th>Movie Director</th>
               <th>Movie Lead Actor</th>
               //<th>Movie Type</th>
          </tr>
     </table>
EOD;
while($row=mysql_fetch_array($result))
{
$movie_name=$row['movie_name'];
$movie_director=$row['movie_director'];
$movie_leadactor=$row['movie_director'];

$movie_details.=<<<EOD
<tr>
<td>$movie_name</td>
<td>$movie_director</td>
<td>$movie_leadactor</td>
</tr>
EOD;

}
$movie_details.=<<<EOD
<tr>
<td>&nbsp;</td>
<tr>
<td>Total:$num_movies Movies</td>
</tr>
EOD;


     //echo $movie;
?>
  #2 (permalink)  
Old March 27th, 2005, 10:02 AM
richard.york's Avatar
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

You might try that book's forum. AKAIK the authors of that book readily participate in the forum and are better equiped to answer questions about it than us. http://p2p.wrox.com/book-asp-net-website-programming-problem-design-solution-23/0

Regards,
Rich

--
[http://www.smilingsouls.net]
Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design


Similar Threads
Thread Thread Starter Forum Replies Last Post
Beginning PHP, Apache, MySQL Web Development rich_m BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 January 7th, 2007 01:16 PM
Problem with book Beginning PHP, Apache, Mysql WD elals BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 1 December 9th, 2005 02:39 AM
Beginning PHP, Apache ... Thank You ! dotty Wrox Book Feedback 0 January 16th, 2005 07:53 AM
Variable naming in Beginning PHP, Apache, MySQL We richard.york Forum and Wrox.com Feedback 0 April 12th, 2004 07:05 PM
Does "Beginning PHP, MySQL and Apache" Exist? pow1983 All Other Wrox Books 12 June 22nd, 2003 06:43 PM





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