Jump to content

brayann36

New Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by brayann36

  1. i am creating a timesheet in php , i need a logic to update the database , the working is as follows

    1. accept employee_id and date , from date get week number , query database with this input as follows

    my database task3 contains and id , emp_id , p_name , time , taskdate 

     

     

    mysql_query("SELECT
      p_name,
      SUM(IF(DAYOFWEEK(taskdate) = 2, `time`, 0)) AS `MO`,
      SUM(IF(DAYOFWEEK(taskdate) = 3, `time`, 0)) AS `TU`,
      SUM(IF(DAYOFWEEK(taskdate) = 4, `time`, 0)) AS `WE`,
      SUM(IF(DAYOFWEEK(taskdate) = 5, `time`, 0)) AS `TH`,
      SUM(IF(DAYOFWEEK(taskdate) = 6, `time`, 0)) AS `FR`,
      SUM(IF(DAYOFWEEK(taskdate) = 7, `time`, 0)) AS `SA`,
      SUM(IF(DAYOFWEEK(taskdate) = 1, `time`, 0)) AS `SU`
    FROM task3
    WHERE e_id = '$r' AND WEEK(`taskdate`,-1) ='$week'
    GROUP BY p_name ");
     
    this is returned through ajax onto my page , and then i can change date and get the result ,(check the attachments)
     
    i want to update the textboxes , this is my issue , i need a logic to get left-mist coloumn project_name and top coloumn date . 
     
    table is created in php , with textboxes and values set to those coming from database , 
  2. Hey fellas , 

    I was clueless about LDAP AND AD when i was told to create a login page for my web-app and check authentication with AD server . After searching through , i came to know what this LDAP is all about .
    i need to get started with it , so i have a email feild and password . All worstations at my workplace have access to that server , as we use it to log on to the system . I need to use the same mechnism in my
    login page . 

    please Help me , how to get started with it , what all things will be necessary .
    This article will be a great help to not only me but to all new PHP developers because somewhere down the line everyone is going to need this . 

    P.S. I have the host name and port of the server where all login details are present i need some php class and tweaks in it to access it on hitting the login button .

    Thanks .

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.