Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jan 2008
    Thanked 0 Times in 0 Posts

    php search, results page

    Bare with me, there are alot of things going on with what I need done and I'm not sure how to word it all. But here it goes.

    I build login and restriction scripts using dreamweaver, but dreamweaver can't help me know. I need a couple scripts or 1 which ever is best. the script I need needs to search a database for reports made and display the results (simple enough even for a noob like me) but it also needs to limit the results according to the logged in user. Each user has a company id number and the results can only show the reports made by their company(this is where I'm lost). The user will search by date. Also, in the result is a column called driver_id, I need that to return the driver name from a different table(some kind of join but I can't get it to work).

    If there is anyone that can do this or help me do this, please let me know.

  2. #2
    New Coder
    Join Date
    Jul 2008
    New York
    Thanked 2 Times in 2 Posts


    Assuming your using MySQL:

    $query = "SELECT * FROM tableName WHERE company_id = '$company_id'";

    $result = mysql_query($query);

    That will return only the reports of the given company id



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts