Filtering

Filtering

sheyessheyes Posts: 3Questions: 0Answers: 0
edited March 2011 in General
I've looked everywhere and I can't find it, and I thought this would have been really common, and its probably soooo simple I'm missing it (Can't see the wood for tress)

How would I filter by someones login id? I have a table in the database which has a full list of all orders placed by all my customers, I want to only show the orders placed by the person logged in.

I'm using server_processing.php

My database table is called associate_orders the col which has the persons logged in ID is called 'AssociateID' I need to select all rows that have AssociateID = to login ID.

Replies

  • compcentralcompcentral Posts: 40Questions: 0Answers: 0
    add
    [code]
    $sWhere = "WHERE AssociateID = 'some login id'";
    [/code]
    right before your database connection information in the server_processing.php script.

    then in the filtering section of the same script change
    [code]
    $sWhere .= "WHERE (";
    [/code]
    to
    [code]
    $sWhere .= " AND (";
    [/code]
  • sheyessheyes Posts: 3Questions: 0Answers: 0
    What did I tell you, I was in the amazon looking for a pine needle!

    Thanks ever so much, still in development mode with the site, so if everything works out will definitely become a Donor!!

    Worked Like a Charm!
  • compcentralcompcentral Posts: 40Questions: 0Answers: 0
    glad to be of assistance.
This discussion has been closed.