User Profile

Collapse

Profile Sidebar

Collapse
srikrrishna
srikrrishna
Last Activity: Jan 20 '16, 07:29 AM
Joined: Nov 1 '15
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • i want to give commission for every parent having 3 childs .

    hi all
    i am doing a mlm project.
    my client request is that for every parent having 3 childs then we give commission 500/-INR. so loop continues for every time while child increases.and my structure is.
    as shown in below.


    CREATE TABLE [dbo].[re](
    [id] [int] IDENTITY(1,1) NOT NULL,
    [sponserid] [varchar](50) NULL,
    [introducerid] [bigint] NULL,
    [placedunderid] [varchar](50) NULL,...
    See more | Go to post

  • how can i get all childs nodes from left and right of a particular parent

    i have 3 tables
    1. regi

    in that regi fields are
    Code:
      id - sponserid - introducerid- name- position
       1-   null-      0 -           devi- o
       2 -  devi-      1-           kasi-  2
       3-   devi -     1-            subbu- 1 
       4.   kasi  -    2-            mahi-2
       5.   kasi-      2-             ram- 1
       6.   subbu-     3 -           lucky-1
       7.   subbu-    3-             harsha
    ...
    See more | Go to post
    Last edited by Rabbit; Nov 13 '15, 05:30 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data. Second Warning.

  • Dear rabbit

    yes i am generating a tree .
    my condition is:
    if 3 childs in one parent then we have to give the commission 500 and after for every child commission increase to 250(500 + 250 = 750)

    and i tried this in query..

    i created regi table

    CREATE TABLE [dbo].[regi](
    [id] [int] IDENTITY(1,1) NOT NULL,
    [sponserid] [varchar](50) NULL,
    [introducername] [varchar](50)...
    See more | Go to post

    Leave a comment:


  • Can any one help me to write the code for count left and right position and calculate

    hi friends i create one table as below

    Code:
    CREATE TABLE [dbo].[regi](
    
    	[id] [int] IDENTITY(1,1) NOT NULL,
    	[sponserid] [varchar](50) NULL,
    	[introducername] [varchar](50) NULL,
    	[placedunderid] [varchar](50) NULL,
    	[name] [varchar](50) NULL,
    	[so] [varchar](50) NULL,
    	[position] [int] NOT NULL,
    	[gender] [int] NOT NULL,
    	[occupation] [varchar](50) NULL,
    	[dob] [varchar](50)
    ...
    See more | Go to post
    Last edited by Rabbit; Nov 6 '15, 06:29 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
No activity results to display
Show More
Working...