Difference between revisions of "NATS4 Create Member Auth View"

From TMM Wiki
Jump to navigationJump to search
(Created page with "Creating a Mysql View allows for the list of active members be directly related to the member table rather than have this information storred in a separate table. To create a...")
 
 
Line 4: Line 4:
 
</pre>
 
</pre>
 
Once the View is created, authentication of your members area would look to this new table view "member_auth_view" rather than looking to "member_auth".
 
Once the View is created, authentication of your members area would look to this new table view "member_auth_view" rather than looking to "member_auth".
 +
 +
'''Please Note:  Since Views do not have database keys, clients with a large amount of members should not considder using a MySQL view as this may cause performance problems on your server '''

Latest revision as of 23:37, 9 January 2013

Creating a Mysql View allows for the list of active members be directly related to the member table rather than have this information storred in a separate table. To create a Mysql view, either have you or your host run the following query:

CREATE VIEW member_auth_view AS SELECT member.memberid,member.username,member.password,member.cryptpass,member.siteid,member.networkid,identifier.tourid,identifier.optionid,identifier.programid,member.trial,member.token FROM member LEFT JOIN identifier ON member.identid=identifier.identid WHERE status=1

Once the View is created, authentication of your members area would look to this new table view "member_auth_view" rather than looking to "member_auth".

Please Note: Since Views do not have database keys, clients with a large amount of members should not considder using a MySQL view as this may cause performance problems on your server