Wrox Programmer Forums
|
BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143
This is the forum to discuss the Wrox book Beginning PHP 6, Apache, MySQL 6 Web Development by Timothy Boronczyk, Elizabeth Naramore, Jason Gerner, Yann Le Scouarnec, Jeremy Stolz; ISBN: 9780470391143
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143 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 August 6th, 2010, 10:31 AM
Authorized User
 
Join Date: Jun 2010
Posts: 36
Thanks: 1
Thanked 1 Time in 1 Post
Default Chp 12 : mysql_fetch_array doesn't return any array

In the chp 12, script: user_personal.php

the following rows doesn't work
PHP Code:
$query 'SELECT
        username, first_name, last_name, city, state, email, hobbies 
    FROM
        site_user u JOIN
        site_user_info i ON u.user_id = i.user_id
    WHERE
        username = "' 
mysql_real_escape_string($_SESSION['username'], $db) . '"';
$result mysql_query($query$db) or die(mysql_error($db));

$row mysql_fetch_array($result);
extract($row); 
in this link you can see the problem.

"Warning: extract() [function.extract]: First argument should be an array "

The function mysql_fetch_array doesn't return an array, but if i try to "simplify" the MYSQL code it works! So, what i've to do? I try also the version "assoc" but nothing...





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chp 12: Problems with htpasswd DMatt BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143 1 August 3rd, 2010 11:53 AM
Chp.12 'custom' SqlDataSource and paging studen77 BOOK: Professional ASP.NET 2.0 Server Control and Component Development ISBN: 978-0-471-79350-2 8 April 4th, 2007 05:49 PM
Chp.12 SqlDataSource.SelectCountCommand ??? studen77 BOOK: Professional ASP.NET 2.0 Server Control and Component Development ISBN: 978-0-471-79350-2 4 March 7th, 2007 02:50 PM
Chp.12 SqlDataSourceView 'owner' property studen77 BOOK: Professional ASP.NET 2.0 Server Control and Component Development ISBN: 978-0-471-79350-2 0 March 6th, 2007 02:58 PM
Chp 12 - userviewer.php problems w/ hyperlinks jaymax BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 2 July 10th, 2003 04:54 PM





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