Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0
This is the forum to discuss the Wrox book Beginning PHP5, Apache, and MySQL Web Development by Elizabeth Naramore, Jason Gerner, Yann Le Scouarnec, Jeremy Stolz, Michael K. Glass; ISBN: 9780764579660
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 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 January 15th, 2008, 08:41 PM
Registered User
 
Join Date: Jan 2008
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 4 Page 118 code

Hi, I have a question about the following code on page 118 I've starred the confusing lines:

function get_leadactor() {
    global $movie_leadactor; ******
    global $leadactor;

    $query_a="SELECT people_fullname " .
         "FROM people " .
         "WHERE people_id = '$movie_leadactor'"; ******
$results_a=mysql_query($query_a)
or die(mysql_error());
$row_a = mysql_fetch_array($results_a);
extract($row_a);
$leadactor=$row_a['people_fullname'];
}

In this function, what is the value of $movie_leadactor, and where does it come from?

Thanks

  #2 (permalink)  
Old January 15th, 2008, 08:58 PM
Registered User
 
Join Date: Jan 2008
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Oh, I think I have it - it's defined in the While loop first, passed from the original query.



Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 14 Code page 620, help needed! Safi BOOK: Beginning ASP 3.0 3 December 8th, 2010 12:43 PM
Chapter 4 pp. 118-119 luciano991 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 August 13th, 2006 01:56 PM
Error in code Chapter 13 Page 516 neubauet BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 9 June 11th, 2006 11:06 AM
P117-118 teldridge Dreamweaver (all versions) 1 November 18th, 2004 05:22 PM





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