1
SoundreameR
xoops_users table

Hi! I'm writing a database synchronizing script for my XOOPS web and another php program on my webserver. I want to synchronize the user registrations and logins of XOOPS with the other database, but there is something that I can't figure out - why are the UIDs and the UNAMEs in a different order and how can I make them be in a same order?

2
OldFriend
Re: xoops_users table
  • 2005/10/30 4:36

  • OldFriend

  • Just popping in

  • Posts: 99

  • Since: 2005/10/28


Do you mean "why aren't they both in alphabetical order?"

I believe that UIDS are "auto increment", so each new member will be assigned the next available sequential number.

The UNAME of course is selected by the new user.

So, unless you get all your members to join in alphabetical order , the 2 fields will not be in the same order.

3
Will_H
Re: xoops_users table
  • 2005/10/30 6:03

  • Will_H

  • Friend of XOOPS

  • Posts: 1786

  • Since: 2004/10/10


slam dunk

4
wtravel
Re: xoops_users table

SoundDreamer, you could use an extra field (column) in your foreign table that holds the XOOPS uid belonging to that user. Default value for that field would be '0' and when you want to match a new value with the existing xoops_users table you update the value to the corresponding uid for this username in the XOOPS table.

Just an example, but using an extra field would be the best way to do it, since you would not want to change the primary autoincrement key field values

5
SoundreameR
Re: xoops_users table

10x guys but, how did XOOPS find out which uid belongs to a user? If I know that, I could make my script without editing the tables.

6
jdseymour
Re: xoops_users table

Quote:

SoundreameR wrote:
10x guys but, how did XOOPS find out which uid belongs to a user? If I know that, I could make my script without editing the tables.


UID's are autoincremented. So when the webmaster creates XOOPS he is assigned a UID of 1, the next member is UID 2 the next member joined is UID 3 and so on.

HTH.

7
SoundreameR
Re: xoops_users table

so I can reorder them by the date of joining the site?

8
OldFriend
Re: xoops_users table
  • 2005/11/1 8:42

  • OldFriend

  • Just popping in

  • Posts: 99

  • Since: 2005/10/28


That should be the order that they are already in.

Why do you want to play with the order? maybe I'm not getting you. The whole idea of a relashional database is that order is unimportant, thats what indexes are for.

9
ZPC
Re: xoops_users table
  • 2005/11/1 10:59

  • ZPC

  • Official Support Member

  • Posts: 76

  • Since: 2002/1/16


To me, it sounds like soundreamer doesn't know much about MySQL commands...

Maybe something like MySQL : SELECT syntax could help?

10
SoundreameR
Re: xoops_users table

Indeed... I am a tyro in this! So let me explain again... I'm trying to make a script and when I call it from the browser (ex.http://myweb.com/db_synch.php?user=SoundreameR ) it echoes something like this "The user ID of SoundreameR in XOOPS is 1 and in phpBB is 2." This is what I don't know how to get, I can deal with the other parts of the script my self.

Login

Who's Online

140 user(s) are online (87 user(s) are browsing Support Forums)


Members: 0


Guests: 140


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits