Will a function reconize a variable from a database?

Discussion in 'PHP' started by Polarbear4646, Jul 28, 2010.

  1. #1
    I'm trying to write code for retrieving information from my database and in there I'm using a function that I'm writing myself to retrieve out exactly what I want. In this function I should be able to refer to a variable that is the name of something to do with my database and have it know what I'm talking about, right?
     
    Polarbear4646, Jul 28, 2010 IP
  2. techbongo

    techbongo Active Member

    Messages:
    309
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    80
    #2
    Your question is not clear. Please describe with example if possible.
     
    techbongo, Jul 28, 2010 IP
  3. Rainulf

    Rainulf Active Member

    Messages:
    373
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    85
    #3
    If you've declared your connection to the database as global, then I'm sure your function will recognize that connection. If not, then you can just pass it to your function's parameter.
     
    Rainulf, Jul 28, 2010 IP