ghanja.be
NederlandsEnglish
Contact Us

Ghanja
Welcome, Guest
Please Login or Register.    Lost Password?
Re:adduser frontend stores a record in user id=0 (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:adduser frontend stores a record in user id=0
#343
dan (User)
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
adduser frontend stores a record in user id=0 5 Months ago 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
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#344
Webmaster (Admin)
Admin
Posts: 194
graph
User Offline Click here to see the profile of this user
Re:adduser frontend stores a record in user id=0 5 Months ago 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!
 
Report to moderator   Logged Logged  
 
Last Edit: 2011/12/22 15:38 By Webmaster.
  The administrator has disabled public write access.
#345
dan (User)
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
Re:adduser frontend stores a record in user id=0 5 Months ago 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
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop
Ghanja Alternative - Community for an open world!
   
Copyright © 2005 - 2012 Ghanja.be - Sitemap