ghanja.be
NederlandsEnglish
Contact Us

Ghanja
Welkom, Gast
Alstublieft Inloggen of Registreren.    Wachtwoord verloren?
Re:adduser frontend stores a record in user id=0 (1 bezoeker) (1) Gast
Ga naar onderkant Reageer Favoriet: 0
TOPIC: Re:adduser frontend stores a record in user id=0
#343
dan (Gebruiker)
Fresh Boarder
Berichten: 2
graphgraph
Gebruiker offline Klik hier om het gebruikersprofiel van deze gebruiker te zien
adduser frontend stores a record in user id=0 5 maanden geleden Karma: 0  
It will add a record with the information i typed but it adds record with id zero. i can add several different records and they all appear in db with id zero.

version 1.2.8

Dan
 
  De Administrator heeft publieke schrijf toegang geblokkeerd.
#344
Webmaster (Admin)
Administrator
Berichten: 194
graph
Gebruiker offline Klik hier om het gebruikersprofiel van deze gebruiker te zien
Re:adduser frontend stores a record in user id=0 5 maanden geleden Karma: 1  
Hey Dan,
I have no idea waht is causing that. Very weird.
If you make a testwebsite for me with FTP acces i can have a look at it if you want.

What i can tell you about this is this:

The first query to the users table isnt choosing an id because its automaticly given one by the db. If it gives ID=0 then something is wrong with your DB i guess.

You can see that here
do a search for Insert record into users in the component files.
When you found it you will see the sql query to add a user to the DB.

A little bit lower you can see the script getting back that ID and using it again for other sql queries.

Code:

list($user_id) = mysql_fetch_row(mysql_query('SELECT LAST_INSERT_ID()'));
BTW: I changed your username to dan. I am not allowing @ signs in username!
 
 
Laatste Wijziging: 22/12/2011 15:38 Door Webmaster.
  De Administrator heeft publieke schrijf toegang geblokkeerd.
#345
dan (Gebruiker)
Fresh Boarder
Berichten: 2
graphgraph
Gebruiker offline Klik hier om het gebruikersprofiel van deze gebruiker te zien
Re:adduser frontend stores a record in user id=0 5 maanden geleden Karma: 0  
Thanks for the quick reply, i checked my DB and it did not have AUTO INCREMENT on for the user table ID field. Don't know how that happened but fixing it did the trick. thanks Dan
 
  De Administrator heeft publieke schrijf toegang geblokkeerd.
Ga naar bovenkant Reageer
Powered by FireBoardbezorg de laatste berichten direct op de desktop
Ghanja Alternatief - Community voor een open wereld!
   
Copyright © 2005 - 2012 Ghanja.be - Sitemap