Welkom op het 4Gamers Forum
Welkom op het forum van 4Gamers Forum. Om te kunnen deelnemen aan onze community moet je even registreren, dit is een eenvoudig en kortstondig proces. Daarna ben je officieel een 4Gamer en kan je deelnemen aan het forum. Door te registreren kan je:
|
Sql probleem
Started By
rafbanaan
, May 08 2012 11:45
12 replies to this topic
#1
Posted 08 May 2012 - 11:45
Ik heb daarnet heel men databank volgestoken met gegevens, maar als ik deze importeer krijg ik de volgende error:
http://dl.dropbox.co...71/Foto's/1.JPG
Mijn insert:
http://dl.dropbox.co...71/Foto's/2.JPG
http://dl.dropbox.co...71/Foto's/1.JPG
Mijn insert:
http://dl.dropbox.co...71/Foto's/2.JPG
I miss you, where are you hiding?
Miss you, your soul’s not lighting up now
I miss you and the hope once shining through you
Miss you, your soul’s not lighting up now
I miss you and the hope once shining through you
#2
Posted 08 May 2012 - 11:58
Staat dat userID op auto-increment? Indien ja, dan moet je geen id ingeven, MySQL zorgt dan zelf voor id-toewijzing. En je paswoord encrypteren met SHA1 
Je query wordt dan:
Insert into users (emailadres, paswoord, ...) values ( 'blabla@bla.bla', SHA1('test'), ...)
Die fout treedt op omdat er al een rij zal zijn met userID 1 en die key moet unique zijn.
Je query wordt dan:
Insert into users (emailadres, paswoord, ...) values ( 'blabla@bla.bla', SHA1('test'), ...)
Die fout treedt op omdat er al een rij zal zijn met userID 1 en die key moet unique zijn.
- 4Gamers Forum Administrator -
#4
Posted 08 May 2012 - 12:35
MiniJeffrey, op 08 May 2012 - 11:58, zei:
Staat dat userID op auto-increment? Indien ja, dan moet je geen id ingeven, MySQL zorgt dan zelf voor id-toewijzing. En je paswoord encrypteren met SHA1 
Je query wordt dan:
Insert into users (emailadres, paswoord, ...) values ( 'blabla@bla.bla', SHA1('test'), ...)
Die fout treedt op omdat er al een rij zal zijn met userID 1 en die key moet unique zijn.
Je query wordt dan:
Insert into users (emailadres, paswoord, ...) values ( 'blabla@bla.bla', SHA1('test'), ...)
Die fout treedt op omdat er al een rij zal zijn met userID 1 en die key moet unique zijn.
Geen auto-increment waardoor ik het raar vind :/
I miss you, where are you hiding?
Miss you, your soul’s not lighting up now
I miss you and the hope once shining through you
Miss you, your soul’s not lighting up now
I miss you and the hope once shining through you
#6
Posted 08 May 2012 - 12:57
Opgelost :3
Ook al had hij ergens een fout, hij zette die database bij phpadmin, waardoor ik bij een tweede poging die duplicate fout kreeg.
Hij is nu geïmporteerd zonder fouten
Ook al had hij ergens een fout, hij zette die database bij phpadmin, waardoor ik bij een tweede poging die duplicate fout kreeg.
Hij is nu geïmporteerd zonder fouten
I miss you, where are you hiding?
Miss you, your soul’s not lighting up now
I miss you and the hope once shining through you
Miss you, your soul’s not lighting up now
I miss you and the hope once shining through you
#8
Posted 08 May 2012 - 13:06
Weer wat bijgeleerd
I miss you, where are you hiding?
Miss you, your soul’s not lighting up now
I miss you and the hope once shining through you
Miss you, your soul’s not lighting up now
I miss you and the hope once shining through you
#9
Posted 08 May 2012 - 13:08
En id's altijd uto-increment doen, bespaart je veel ellende later.
- 4Gamers Forum Administrator -
#10
Posted 08 May 2012 - 17:55
Voor school opdrachten mag dat niet altijd, sommige oefeningen draaien net rond het maken van ID's en het omgaan met ID's die er vantussen vallen.
InFerNo
4Gamers Nights organisator samen met Jejskov en Curze!
Livestreaming via www.ground-zero.tv.
4Gamers Nights organisator samen met Jejskov en Curze!
Livestreaming via www.ground-zero.tv.
#11
Posted 08 May 2012 - 19:18
mag er eigenlijk wel een ' single quote staan in uw query?
We all die. The goal isn't to live forever, the goal is to create something that will.
www.youtube.com/sharpless512 - @sharpless512
www.youtube.com/sharpless512 - @sharpless512
#12
Posted 08 May 2012 - 19:28
Sharpless..., op 08 May 2012 - 19:18, zei:
mag er eigenlijk wel een ' single quote staan in uw query?
PSN valies - Twitter
"Lightning. It flashes bright, then fades away. It can't protect. It only destroys."
Baka!
"Lightning. It flashes bright, then fades away. It can't protect. It only destroys."
Baka!
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users


