rgoogs21
-
Posts
2 -
Joined
-
Last visited
Never
Posts posted by rgoogs21
-
-
Hello I am new here and a little new to PHP and MySQL also. I have a site that was made with php and a mysql database and was recently moved to a new hosting service. Now whenever I add data to the database through my site I can do it the first time but after that I get this error
[code]Error in SQL query! MySQL: Duplicate entry '0' for key 1
[/code]
I figured out it has to do with the ID it gives each piece in the table it is in but I dont know how to set it to start at the number it left off on when it was at the old hosting. Any help will be greatly appreciated.
Ryan
Database error
in PHP Coding Help
Posted
[code]
Field Type Null Default
id_program smallint(6) No 0
id_user smallint(6) No 0
nazwa varchar(50) No
url varchar(70) No
opis text No
mail varchar(30) No
forum varchar(70) No
feedback varchar(100) No
telefon varchar(20) No
icq varchar(30) No
data date No 0000-00-00
status char(1) No
rating float No 0
min_payout varchar(100) No
min_deposit varchar(100) No
time_payout varchar(150) No
referral varchar(20) No
total smallint(6) No 0
comment text No
exclusive char(1) No
premium char(1) No
blacklist char(1) No
stormpay char(1) No
egold char(1) No
ebullion char(1) No
goldmoney char(1) No
netpay char(1) No
intgold char(1) No
moneybookers char(1) No
alertpay char(1) No
emo char(1) No
paypal char(1) No
other char(1) No
uniclear char(1) No
premium_no tinyint(4) No 0
[/code]
That is a table where people add their program to the database. I currently have around 21 and now it starts with the id_program of 0 and never moves
Wow I think I just figured it out. Thank you so much for pointing me in the right direction. If I need any more help I will be back. Thanks again.
Ryan