User Tools

Site Tools


podoc:is_user_my_client_sql_function

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
podoc:is_user_my_client_sql_function [2007/04/13 07:22] Luudpodoc:is_user_my_client_sql_function [2007/04/23 14:30] (current) Luud
Line 6: Line 6:
  
 === Description === === Description ===
 +
 +Checks if a particular user is a client of another user.
  
 === Purpose === === Purpose ===
 +
 +To retrieve the client status of a particular user with another user.
  
 === Schema === === Schema ===
  
-  create function is_user_my_client(integer, integer) returns bigint +<code sql> 
-  as 'select count(identifier) +create function is_user_my_client(integer, integer) returns bigint 
-        from client +as 'select count(identifier) 
-       where client.users = $1 +      from client 
-         and client.client = $2 +     where client.users = $1 
-         and status=2' language 'sql';+       and client.client = $2 
 +       and status=2' language 'sql'; 
 +</code>
  
 === Related tables === === Related tables ===
  
-=== Related indexes === +  * [[client sql table|client]]
- +
-=== Related functions === +
- +
-=== Related views ===+
  
 === History === === History ===
Line 40: Line 42:
 = Version 2.5 = = Version 2.5 =
  
-  create function is_user_my_client(integer, integer) returns bigint +<code sql> 
-  as 'select count(identifier) +create function is_user_my_client(integer, integer) returns bigint 
-        from client +as 'select count(identifier) 
-       where client.users = $1 +      from client 
-         and client.client = $2 +     where client.users = $1 
-         and status=2' language 'sql';+       and client.client = $2 
 +       and status=2' language 'sql'; 
 +</code>
  
podoc/is_user_my_client_sql_function.1176448966.txt.gz · Last modified: 2007/04/13 07:22 by Luud