Mysql Help
Started by MF1, May 22 2006 02:51 AM
7 replies to this topic
#1
Posted 22 May 2006 - 02:51 AM
Yeah someone set me up something on mysql and it was working fine when i was created users for some pics but now all im getting is this error that keeps saying this
Error
SQL query:
INSERT INTO `gallery` ( `id` , `owner` , `comment` , `link` )
VALUES (
NULL , 'Cab', 'ol', '/gallerypix/cab44.JPG'
), (
NULL , '', '', ''
)
MySQL said:
#1062 - Duplicate entry '127' for key 1
does anyone one know what this means or can help me? pm me or reply
------mf1
Error
SQL query:
INSERT INTO `gallery` ( `id` , `owner` , `comment` , `link` )
VALUES (
NULL , 'Cab', 'ol', '/gallerypix/cab44.JPG'
), (
NULL , '', '', ''
)
MySQL said:
#1062 - Duplicate entry '127' for key 1
does anyone one know what this means or can help me? pm me or reply
------mf1
#2
Posted 22 May 2006 - 09:32 AM
umm give this a go:
INSERT INTO `gallery` (`owner`, `comment`, `link`) VALUES ('Cab', 'ol', '/gallerypix/cab44.JPG')
edit:
oh and make sure that the image you are inserting isnt already inserted as if the column is set to unique and there is already tht img in there then that is the problem
INSERT INTO `gallery` (`owner`, `comment`, `link`) VALUES ('Cab', 'ol', '/gallerypix/cab44.JPG')
edit:
oh and make sure that the image you are inserting isnt already inserted as if the column is set to unique and there is already tht img in there then that is the problem
Edited by deadly, 22 May 2006 - 09:33 AM.
#3
Posted 22 May 2006 - 11:42 AM
I have had this problem a while back (when i was innocent xD)
The problem is not with any query, the person who set up your table did it wrong
To fix it you must simply change the datatype for the ID field or whichevery you are using as a key to "INT".
i reckon it is currently set as tinyint? tinyint has a 127 entry limit
So change the key to INT.
Oh and deadly, its an auto increment field so there wouldnt be a duplicate
The problem is not with any query, the person who set up your table did it wrong
To fix it you must simply change the datatype for the ID field or whichevery you are using as a key to "INT".
i reckon it is currently set as tinyint? tinyint has a 127 entry limit
So change the key to INT.
Oh and deadly, its an auto increment field so there wouldnt be a duplicate
Edited by .Matt, 22 May 2006 - 11:42 AM.
#4
Posted 22 May 2006 - 12:04 PM
yea its one of those things u cant judge til u have seen the structure of the table / database
edit
i've taken a look at it and yea you were right .Matt it was set as tinyint. Good call, i fixed it up for him.
edit
i've taken a look at it and yea you were right .Matt it was set as tinyint. Good call, i fixed it up for him.
Edited by deadly, 25 May 2006 - 02:43 AM.
#5
Posted 25 May 2006 - 10:03 PM
i've got something like that in a few days ago...
it because, your data have come in into ur database. Try to come in to your mysql command line and make query :
"select * from gallery";
or, if it's doesn't dissapear, try to delete data from ur table : "delete from gallery";.
My suggest is, try to check ur souce code, because the error came from wrong source code.
I hope it can help u....
it because, your data have come in into ur database. Try to come in to your mysql command line and make query :
"select * from gallery";
or, if it's doesn't dissapear, try to delete data from ur table : "delete from gallery";.
My suggest is, try to check ur souce code, because the error came from wrong source code.
I hope it can help u....
#6
Posted 26 May 2006 - 12:26 AM
i dont have a clue what your on about and it is all fixed.....
#7
Posted 26 May 2006 - 03:27 AM
joe, on May 26 2006, 04:03 AM, said:
i've got something like that in a few days ago...
it because, your data have come in into ur database. Try to come in to your mysql command line and make query :
"select * from gallery";
or, if it's doesn't dissapear, try to delete data from ur table : "delete from gallery";.
My suggest is, try to check ur souce code, because the error came from wrong source code.
I hope it can help u....

it because, your data have come in into ur database. Try to come in to your mysql command line and make query :
"select * from gallery";
or, if it's doesn't dissapear, try to delete data from ur table : "delete from gallery";.
My suggest is, try to check ur souce code, because the error came from wrong source code.
I hope it can help u....
Dont cha just love the way people ignore me? ha
Thats a load of rubbbish
But no matter, Glad its fixed Deadly.
#8
Posted 26 May 2006 - 03:30 AM
yep all down to you thou
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
