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

March 22nd, 2007, 06:49 PM
|
Authorized User
|
|
Join Date: Feb 2006
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|

March 22nd, 2007, 08:27 PM
|
Wrox Author
|
|
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
|
|
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
================================================== =========
|

March 22nd, 2007, 09:10 PM
|
Authorized User
|
|
Join Date: Feb 2006
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|

March 22nd, 2007, 10:08 PM
|
Wrox Author
|
|
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
|
|
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
================================================== =========
|

March 22nd, 2007, 11:18 PM
|
Authorized User
|
|
Join Date: Feb 2006
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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?
|

March 23rd, 2007, 05:06 AM
|
Wrox Author
|
|
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
|
|
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
================================================== =========
|

March 24th, 2007, 09:15 PM
|
Authorized User
|
|
Join Date: Feb 2006
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|
 |