Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 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
  #11 (permalink)  
Old January 14th, 2010, 05:31 PM
Authorized User
 
Join Date: Dec 2009
Posts: 14
Thanks: 3
Thanked 0 Times in 0 Posts
Unhappy

After the changes, this is the error message, always the same:

Unknown column 'movie_runnig_time' in 'field list'

Now the code is the next:
Code:
<?php
$db = mysql_connect('localhost', 'bp6am', 'bp6ampass') or
    die ('Unable to connect. Check your connection parameters.');
mysql_select_db('moviesite', $db) or die(mysql_error($db));

// modifica la tabella movie aggiungendo i campi per durata, incassi e costi
//$query = 'ALTER TABLE movie ADD COLUMN (
//      movie_running_time TINYINT UNSIGNED NULL,
//       movie_cost         DECIMAL(4,1)     NULL,
//       movie_takings      DECIMAL(4,1)     NULL)';
//mysql_query($query, $db) or die (mysql_error($db));

// inserisce i nuovi dati nella tabella movie
$query = 'UPDATE movie SET
        movie_runnig_time=101,
        movie_cost=81,
        movie_takings=242.6
    WHERE
        movie_id=1';
mysql_query($query, $db) or die(mysql_error($db));

$query = 'UPDATE movie SET
        movie_running_time=89,
        movie_cost=10,
        movie_takings=10.8
    WHERE
        movie_id=2';
mysql_query($query, $db) or die(mysql_error($db));

$query = 'UPDATE movie SET
        movie_running_time=134,
        movie_cost=NULL,
        movie_takings=33.2
    WHERE
        movie_id=3';
mysql_query($query, $db) or die(mysql_error($db));

echo 'Movie database successfully updated!';
?>
HELP
Reply With Quote
  #12 (permalink)  
Old January 14th, 2010, 05:50 PM
Authorized User
 
Join Date: Jan 2010
Posts: 19
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Your code will continue to fail if you do not fix runnig to running.



You have a typographical error in your code that is causing the problem. Until you fix that, your code will continue to fail at the same point.


Hopefully the site translated this correctly...
Lei ha un errore tipografico nel suo codice che causa il problema. Finché lei ciò ripara, il suo codice continuerà a fallire allo stesso punto.



Code:
<?php
$db = mysql_connect('localhost', 'bp6am', 'bp6ampass') or
    die ('Unable to connect. Check your connection parameters.');
mysql_select_db('moviesite', $db) or die(mysql_error($db));

// modifica la tabella movie aggiungendo i campi per durata, incassi e costi
//$query = 'ALTER TABLE movie ADD COLUMN (
//      movie_running_time TINYINT UNSIGNED NULL,
//       movie_cost         DECIMAL(4,1)     NULL,
//       movie_takings      DECIMAL(4,1)     NULL)';
//mysql_query($query, $db) or die (mysql_error($db));

// inserisce i nuovi dati nella tabella movie
$query = 'UPDATE movie SET
        movie_running_time=101,   <<<<<<<<<<<<<<<<<<<<<<<<<<<<< FIX THIS!
        movie_cost=81,
        movie_takings=242.6
    WHERE
        movie_id=1';

Last edited by s.c.; January 14th, 2010 at 05:56 PM..
Reply With Quote
The Following User Says Thank You to s.c. For This Useful Post:
rickymartini76@yahoo.it (January 14th, 2010)
  #13 (permalink)  
Old January 14th, 2010, 06:10 PM
Authorized User
 
Join Date: Dec 2009
Posts: 14
Thanks: 3
Thanked 0 Times in 0 Posts
Wink

OK!
I AM SO STUPID...
Now this is the message:
Movie database successfully updated!

WOW! THANK YOU SO MUCH... YOU ARE THE BEST!
Reply With Quote
  #14 (permalink)  
Old January 14th, 2010, 06:16 PM
Authorized User
 
Join Date: Jan 2010
Posts: 19
Thanks: 0
Thanked 4 Times in 4 Posts
Default

No problem, it is all part of programming...

Have a good day.
Reply With Quote
The Following User Says Thank You to s.c. For This Useful Post:
rickymartini76@yahoo.it (January 16th, 2010)
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
Chapter 6 : Message Contract Program Example thsun BOOK: Professional WCF Programming: .NET Dev with Windows Communication Found ISBN: 9780470089842 16 January 11th, 2008 12:34 PM
Chapter 7 Error message carlfoster BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 1 January 31st, 2007 02:07 PM



All times are GMT -4. The time now is 05:19 AM.


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