• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unique ids?

 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In general, yes this is true. Especially for the items you talked about. If you dig into the database definitions you will find them listed as primary keys and generally set up as "autoincrement" fields. Both of which need to be unique.

However, be aware that in the < 3.0 series there are several jForum tables that don't have a single field defined as a primary key. Generally these are "relational" tables like group membership and the like. I doubt you'll have to deal with them for your project, but just in case...

[originally posted on jforum.net by monroe]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to store extra information about topics and entries in my own database. Can I assume that it is impossible to have two topics with the same id, even in different forums? And also impossible with to entries with the same id.

My experience so far is that all ids are unique across any type of object. Hence if a topic has id 1, than no user, forum or entry may have that id. Is this also correct?

Best Regards
[originally posted on jforum.net by frankern]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good to know anyway - thanks!
[originally posted on jforum.net by frankern]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic