SlideShare ist ein Scribd-Unternehmen logo
1 von 14
Downloaden Sie, um offline zu lesen
User Relationships




     www.prodigyview.com
Overview
Objective
Learn to create relationships between users, similar to
social networking sites.
Requirements
 Install version of ProdigyView with a database
  connection
 Understanding of how to create a user
Estimated Time
10 Minutes

                     www.prodigyview.com
Follow Along With Code
                 Example
1. Download a copy of the example code at
  www.prodigyview.com/source.
2. Install the system in an environment you feel comfortable testing in.
3. Proceed to examples/user/UsersRelationships.php
Having A Relationship
Having a relationship is nothing easy. It takes time,
commitment, lot of moneys and sometimes lots of
chocolate to feel loved if you are being neglected.
Thankfully in ProdigyView all you need to have is more
than one user and you can define a relationship between
them. We will be covering in tutorial:
 Creating a relationship
 Checking if a relationship exist
 Modifying a relationship
 Deleting a relationship(breaking up)
                      www.prodigyview.com
Add Some Users
Our example starts by first creating some users. If you are
following along in the code example, there are two more
users created besides the two below.
Creating A Relationship
  Now that we have our users present in the database, we
  can start creating relationships. It takes two to make this
  thing go right, so we at least require two users, a
  relationship type, and relationship status.

1. Add the first user          2. Add the second user




                                   4. Add the relationship status. Meaning of
3. Set the relationship type       numbers is set by you. Example '1 could be
                                   ‘accepted’ and 0 mean ‘pending’.
Database View
Your database should look something like after adding the
users.




                     www.prodigyview.com
Searching Relationships
Next we can search through our relationship using
getUserRelationshipList() method. The method uses PV
Standard Search arguments when querying for
matches.


1. Search for users based on the requesting users field




                    2. The ‘,’ symbolizes an OR used in SQL

3. Returns the relationships as an array of arrays
Compare Relationships
Since we are pulling out our users, lets do some comparisons
using the checkUserRelationship(). This method checks if
there is an relationship among users. Explanation on next
slide.




                       www.prodigyview.com
Comparison Explanation
  1. Iterate through the               2. Get the users information based on their
  relationships                        user_id in the relationship




3. Print out the found relationship type          4. Check is there is any
                                                  relationship based on the two
                                                  users ids

                            5. Results on next slide
The Comparison Results
If they are suppose be a family, something is definitely off.
Removing A Relationship
Obviously the relationships were not quite working out so
it’s time for everyone to go there separate ways. I guess
that means it’s time to delete some relationships.




       Delete the relationship by passing in the relationship id


                           www.prodigyview.com
Review
1. Add a relationship PVUsers::addUserRelationship()
2. Check if a relationship exist by using
   PVUsers::checkUserRelationship().

3. Search for user relationships with
   PVUsers::getUserRelationshipList()

4. Delete a user relationship with
   PVUsers::deleteUserRelationship()




                         www.prodigyview.com
API Reference
For a better understanding of the users, visit the api by
clicking on the link below.

PVUsers




                 More Tutorials
For more tutorials, please visit:

http://www.prodigyview.com/tutorials


                       www.prodigyview.com

Weitere ähnliche Inhalte

Mehr von ProdigyView

Building An Application
Building An ApplicationBuilding An Application
Building An ApplicationProdigyView
 
Installing Applications
Installing ApplicationsInstalling Applications
Installing ApplicationsProdigyView
 
HTML5 Tags and Elements Tutorial
HTML5 Tags and Elements TutorialHTML5 Tags and Elements Tutorial
HTML5 Tags and Elements TutorialProdigyView
 
HTML Forms Tutorial
HTML Forms TutorialHTML Forms Tutorial
HTML Forms TutorialProdigyView
 
Html Tags Tutorial
Html Tags TutorialHtml Tags Tutorial
Html Tags TutorialProdigyView
 
Video Conversion PHP
Video Conversion PHPVideo Conversion PHP
Video Conversion PHPProdigyView
 
Sending Email Basics PHP
Sending Email Basics PHPSending Email Basics PHP
Sending Email Basics PHPProdigyView
 
Tools ProdigyView
Tools ProdigyViewTools ProdigyView
Tools ProdigyViewProdigyView
 
Custom Validation PHP
Custom Validation PHPCustom Validation PHP
Custom Validation PHPProdigyView
 
Basic File Cache Tutorial - PHP
Basic File Cache Tutorial - PHPBasic File Cache Tutorial - PHP
Basic File Cache Tutorial - PHPProdigyView
 
Understanding Web Cache
Understanding Web CacheUnderstanding Web Cache
Understanding Web CacheProdigyView
 
Javascript And CSS Libraries
Javascript And CSS LibrariesJavascript And CSS Libraries
Javascript And CSS LibrariesProdigyView
 
SQL Prepared Statements Tutorial
SQL Prepared Statements TutorialSQL Prepared Statements Tutorial
SQL Prepared Statements TutorialProdigyView
 
Implementing the Adapter Design Pattern
Implementing the Adapter Design PatternImplementing the Adapter Design Pattern
Implementing the Adapter Design PatternProdigyView
 
Intercepting Filters Design Pattern
Intercepting Filters Design PatternIntercepting Filters Design Pattern
Intercepting Filters Design PatternProdigyView
 
Creating Dynamic Objects PHP
Creating Dynamic Objects PHPCreating Dynamic Objects PHP
Creating Dynamic Objects PHPProdigyView
 
PV Standard Search Query
PV Standard Search QueryPV Standard Search Query
PV Standard Search QueryProdigyView
 
Prodigyview XML COnfiguration File
Prodigyview XML COnfiguration FileProdigyview XML COnfiguration File
Prodigyview XML COnfiguration FileProdigyView
 

Mehr von ProdigyView (20)

Building An Application
Building An ApplicationBuilding An Application
Building An Application
 
Installing Applications
Installing ApplicationsInstalling Applications
Installing Applications
 
HTML5 Tags and Elements Tutorial
HTML5 Tags and Elements TutorialHTML5 Tags and Elements Tutorial
HTML5 Tags and Elements Tutorial
 
HTML Forms Tutorial
HTML Forms TutorialHTML Forms Tutorial
HTML Forms Tutorial
 
Html Tags Tutorial
Html Tags TutorialHtml Tags Tutorial
Html Tags Tutorial
 
Video Conversion PHP
Video Conversion PHPVideo Conversion PHP
Video Conversion PHP
 
Sending Email Basics PHP
Sending Email Basics PHPSending Email Basics PHP
Sending Email Basics PHP
 
Tools ProdigyView
Tools ProdigyViewTools ProdigyView
Tools ProdigyView
 
Custom Validation PHP
Custom Validation PHPCustom Validation PHP
Custom Validation PHP
 
Basic File Cache Tutorial - PHP
Basic File Cache Tutorial - PHPBasic File Cache Tutorial - PHP
Basic File Cache Tutorial - PHP
 
Understanding Web Cache
Understanding Web CacheUnderstanding Web Cache
Understanding Web Cache
 
Javascript And CSS Libraries
Javascript And CSS LibrariesJavascript And CSS Libraries
Javascript And CSS Libraries
 
PHP Libraries
PHP LibrariesPHP Libraries
PHP Libraries
 
SQL Prepared Statements Tutorial
SQL Prepared Statements TutorialSQL Prepared Statements Tutorial
SQL Prepared Statements Tutorial
 
Database Basics
Database BasicsDatabase Basics
Database Basics
 
Implementing the Adapter Design Pattern
Implementing the Adapter Design PatternImplementing the Adapter Design Pattern
Implementing the Adapter Design Pattern
 
Intercepting Filters Design Pattern
Intercepting Filters Design PatternIntercepting Filters Design Pattern
Intercepting Filters Design Pattern
 
Creating Dynamic Objects PHP
Creating Dynamic Objects PHPCreating Dynamic Objects PHP
Creating Dynamic Objects PHP
 
PV Standard Search Query
PV Standard Search QueryPV Standard Search Query
PV Standard Search Query
 
Prodigyview XML COnfiguration File
Prodigyview XML COnfiguration FileProdigyview XML COnfiguration File
Prodigyview XML COnfiguration File
 

Kürzlich hochgeladen

Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Jeffrey Haguewood
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Karmanjay Verma
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 

Kürzlich hochgeladen (20)

Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 

User Relationships CMS PHP

  • 1. User Relationships www.prodigyview.com
  • 2. Overview Objective Learn to create relationships between users, similar to social networking sites. Requirements  Install version of ProdigyView with a database connection  Understanding of how to create a user Estimated Time 10 Minutes www.prodigyview.com
  • 3. Follow Along With Code Example 1. Download a copy of the example code at www.prodigyview.com/source. 2. Install the system in an environment you feel comfortable testing in. 3. Proceed to examples/user/UsersRelationships.php
  • 4. Having A Relationship Having a relationship is nothing easy. It takes time, commitment, lot of moneys and sometimes lots of chocolate to feel loved if you are being neglected. Thankfully in ProdigyView all you need to have is more than one user and you can define a relationship between them. We will be covering in tutorial:  Creating a relationship  Checking if a relationship exist  Modifying a relationship  Deleting a relationship(breaking up) www.prodigyview.com
  • 5. Add Some Users Our example starts by first creating some users. If you are following along in the code example, there are two more users created besides the two below.
  • 6. Creating A Relationship Now that we have our users present in the database, we can start creating relationships. It takes two to make this thing go right, so we at least require two users, a relationship type, and relationship status. 1. Add the first user 2. Add the second user 4. Add the relationship status. Meaning of 3. Set the relationship type numbers is set by you. Example '1 could be ‘accepted’ and 0 mean ‘pending’.
  • 7. Database View Your database should look something like after adding the users. www.prodigyview.com
  • 8. Searching Relationships Next we can search through our relationship using getUserRelationshipList() method. The method uses PV Standard Search arguments when querying for matches. 1. Search for users based on the requesting users field 2. The ‘,’ symbolizes an OR used in SQL 3. Returns the relationships as an array of arrays
  • 9. Compare Relationships Since we are pulling out our users, lets do some comparisons using the checkUserRelationship(). This method checks if there is an relationship among users. Explanation on next slide. www.prodigyview.com
  • 10. Comparison Explanation 1. Iterate through the 2. Get the users information based on their relationships user_id in the relationship 3. Print out the found relationship type 4. Check is there is any relationship based on the two users ids 5. Results on next slide
  • 11. The Comparison Results If they are suppose be a family, something is definitely off.
  • 12. Removing A Relationship Obviously the relationships were not quite working out so it’s time for everyone to go there separate ways. I guess that means it’s time to delete some relationships. Delete the relationship by passing in the relationship id www.prodigyview.com
  • 13. Review 1. Add a relationship PVUsers::addUserRelationship() 2. Check if a relationship exist by using PVUsers::checkUserRelationship(). 3. Search for user relationships with PVUsers::getUserRelationshipList() 4. Delete a user relationship with PVUsers::deleteUserRelationship() www.prodigyview.com
  • 14. API Reference For a better understanding of the users, visit the api by clicking on the link below. PVUsers More Tutorials For more tutorials, please visit: http://www.prodigyview.com/tutorials www.prodigyview.com