CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Password on two tables

Print topic Send  topic

Author Message
Fred
Posted: 05/22/2002, 11:08 PM

I am working with login and password on my 'users' table in ASP project. Now client wants to add a new table with the name 'organization'. I want to include this new table in my login/password. So at user level it should pick the login/password from 'organization' table. What should I do? Is it possible for me to create another new table witht the name 'password' and include all login/passwords in this table and when any user wants to enter in it, login/password come from new table? Please reply in detail as I am new.
Nicole
Posted: 05/23/2002, 1:24 AM

Fred,
the solution depends on tables structure. If you create new table 'organization' and move all the records from 'users' table to it, the only thing you should do is to change security table within project.

If you prefer to create new session variable "organization" when user log in you should create Custom Login event and add some manual code the similar to existing one, that will create new session var.

Again, details depends on tables structure and session variables you want to create.
fred
Posted: 05/23/2002, 1:46 AM

Actually, 'organization' table is a new table. It has different login and passwords. So what should I do?
Nicole
Posted: 05/23/2002, 2:28 AM

Fred,
do you mean that you want to store the password in users and organization tables? Are password values the same?
Fred
Posted: 05/23/2002, 8:12 PM

Yes, I want to implement login/password on two tables 'users' and 'organization'. Both tables are seperate and having no connection with each other except primary key 'user_id' which is present in both.

Another issue: Both of these tables are for registration forms. Entry forms are seperate for both tables but I want to show the output results of search from both tables at a time. For example a user wants to see the all registered users with the name 'Joseph', so search should pick the records from 'users' and 'organization' tables at the same table.
Nicole
Posted: 05/25/2002, 1:58 AM

Fred,
If password values are identical in both tables for each user you can leave password field in one table. If no, you will need to modify Login form and force use to enter 2 passwords. Also you should create Custom Login event in order to check password fields in both table.

As for displaying info from two table in one Grid form you can join tables on user_id field using CC built in join functionality. Or you can create custom sql for Grid.
schaeff
Posted: 05/26/2002, 6:56 AM

As far as I understand you. You have a valid users table with login, passwd and userID and want to add a new oragnization table with the same fields (maybe called differently though) and other information stored in them.
Then when somebody wants to log in the login procedure shall look in both tables weather the login is valid. Did I get that right?

One way would be to change the Login event to some custom code that uses both tables.
I think the better approch would be to add a new field to your existing users table: Organization ENUM(Y,N)
Then add all organizations to the existing users table (adding new fields where you need them) and set Organization=Y for them. This way you can later do grids, searches etc. on organizations only whenever you need to ...

Philippe
Fred
Posted: 05/26/2002, 9:03 PM

Please elaborate in detail because I am new.
I have two tables with different fields and all login and passwords are in table 'users'. How I will get outputs from two tables with search form. For example both tables have some fields identical ie name, organization, address, phone etc.
Please tell me in detail -- the whole procedure of login/password in easy words.
Thanks in advance
schaeff
Posted: 05/28/2002, 3:50 PM

... I would love to give you more details if I only could make out exactly what is stored in your tables and especially why it is stored in two tables.
Could you maybe post the field names and types as well as some example input?

If all information that is relevant for authentication is stored in only one table then you should use this table for authentication (man, that sounds logical!) that is as source for the login page.
If you later on want to join the information of another table with the one used for login you should use the Query Builder in order to build a appropriate SQL query.

Philippe

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.