Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | 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 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 22nd, 2007, 06:49 PM
Authorized User
 
Join Date: Feb 2006
Location: , , .
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default Can Someone Please Try This Out...

 I seem to be having a phpmyadmin problem.. Can some one please try this out on your phpmyadmin and see if it works...

* please make a database and a table named movie, and create these 3 fields movie_name movie_type and movie_year.

Then type this is in your phpmyadmin and see if it works

INSERT INTO
 'movie'
 ('movie_name', 'movie_type', 'movie_year')
VALUES
 ('Bruce Almighty', '1', '2003')

If it does work, please let me know what version of MySQL and phpmyadmin you are currently using.. Because I can't seem to get mine to work without getting an error.

- Thank You
Reply With Quote
  #2 (permalink)  
Old March 22nd, 2007, 08:27 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

1 what is the error?
2 what are the data types of the fields?

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
Reply With Quote
  #3 (permalink)  
Old March 22nd, 2007, 09:10 PM
Authorized User
 
Join Date: Feb 2006
Location: , , .
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by dparsons
 1 what is the error?
2 what are the data types of the fields?

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
1) The error

Error

SQL query:

INSERT INTO 'movie'(
'movie_name',
'movie_type',
'movie_year'
)
VALUES (
'Bruce Almighty', '1', '2003'
)

MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''movie'
('movie_name', 'movie_type', 'movie_year')
VALUES
('Bruce Almighty'' at line 2

2) Data type

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',

Please let me know if you find anything... thank you for your time.

-TheDudeTux

Reply With Quote
  #4 (permalink)  
Old March 22nd, 2007, 10:08 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

INSERT INTO movie(movie_name, movie_type, movie_year)VALUES('Bruce Almighty', 1, 2003)

That should fix your problem let me know.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
Reply With Quote
  #5 (permalink)  
Old March 22nd, 2007, 11:18 PM
Authorized User
 
Join Date: Feb 2006
Location: , , .
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by dparsons
 INSERT INTO movie(movie_name, movie_type, movie_year)VALUES('Bruce Almighty', 1, 2003)

That should fix your problem let me know.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
Hey Dparsons it worked!! Thanks a lot man. But, I still don't understand why the original way didn't work? I was following the example in the book.. which included the semi quotes ' ' Is this an error in the book? Or is this a configuration problem on my end? Thanks again, I been delayed for a couple days cause of this.

- Thank You

p.s. do you use phpmyadmin or something else?

Reply With Quote
  #6 (permalink)  
Old March 23rd, 2007, 05:06 AM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

You syntax was incorrect because you were using ' as opposed to ` When you surrounded the table name and column names with ' ' you turned them into string literals and mysql didnt understand which table and columns you were trying to insert into.

I have not used MySQL in a few years but when I did, I used Query Browser and MySQL Administrator

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
Reply With Quote
  #7 (permalink)  
Old March 24th, 2007, 09:15 PM
Authorized User
 
Join Date: Feb 2006
Location: , , .
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by dparsons
 You syntax was incorrect because you were using ' as opposed to ` When you surrounded the table name and column names with ' ' you turned them into string literals and mysql didnt understand which table and columns you were trying to insert into.

I have not used MySQL in a few years but when I did, I used Query Browser and MySQL Administrator

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
 Hey Dparsons... Thanks a lot for helping me out on this. I get what you were saying. Now I can move on with these chapters, thanks again.
 -TheDudeTux

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




All times are GMT -4. The time now is 02:50 AM.


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