cannot insert data into mysql

10 views
Skip to first unread message

Irfan Ahmed

unread,
Aug 27, 2010, 8:29:12 AM8/27/10
to rubyonra...@googlegroups.com
When I am going to create a  new product Item into my depot application I got the following error:
Mysql::Error: #23000Duplicate entry '0' for key 1: INSERT INTO products (`image_url`, `date_available`, `price`, `title`, `description`) VALUES('http://www.facebook.com/Meghkabbo.png', '2010-08-27 12:23:00', '90.0', 'jjhjh', 'hgjgjhjkhjhkhkkkkkhkhkhkh')
I am new to ruby on rails and following Agile Web Development with Rails.

Please help me about the problem.

--
Thanks
Irfan

Sergio Sergio

unread,
Aug 27, 2010, 2:25:10 PM8/27/10
to rubyonra...@googlegroups.com
the id is not auto-increment but unique

2010/8/27 Irfan Ahmed <irfa...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Irfan Ahmed

unread,
Aug 27, 2010, 5:24:47 PM8/27/10
to rubyonra...@googlegroups.com
yap I have solved that problem it was not set to auto increment. Thanks dear:)
--
Irfan Ahmed Rizvi
http://www.creativemake.com

Reply all
Reply to author
Forward
0 new messages