Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2006
    Posts
    13

    Unanswered: Some basic help needed with PHP/mySQL

    Hello,
    I know this may seem like a basic questions to most of you, but Im quite a newbie at this stuff.

    Anyway, I am working on a website script that doesnt seem like it ever closes the databse connection. Isnt this something that should be on every page?

    Also, what is the code to close the database connection?

    Thanks for any help,
    Amanda
    Thats my 2 cents,
    Amanda
    BizBla

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    it depends
    most MySQL / PHP connections will auto close on the termination of thre script, its an example of PHP's self tidying ethos

    depending on what you used to open your connection you could use Mysql_Close fucntion or if you are suing the newer style of class based access close the class and dispose of it properly.
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Aug 2006
    Posts
    13
    Quote Originally Posted by healdem
    it depends
    most MySQL / PHP connections will auto close on the termination of thre script, its an example of PHP's self tidying ethos

    depending on what you used to open your connection you could use Mysql_Close fucntion or if you are suing the newer style of class based access close the class and dispose of it properly.
    Thanks Mark,
    Got it all figured out now. I appreciate you sending me in the right direction.
    Thats my 2 cents,
    Amanda
    BizBla

  4. #4
    Join Date
    Aug 2006
    Posts
    13
    Quote Originally Posted by healdem
    it depends
    most MySQL / PHP connections will auto close on the termination of thre script, its an example of PHP's self tidying ethos

    depending on what you used to open your connection you could use Mysql_Close fucntion or if you are suing the newer style of class based access close the class and dispose of it properly.
    Thanks,
    Got it all figured out now. I appreciate you sending me in the right direction.
    Thats my 2 cents,
    Amanda
    BizBla

  5. #5
    Join Date
    Aug 2006
    Posts
    13
    I have another very basic question...

    Can someone give me an example of the coding that I need to show a member count on a homepage?

    php/mysql
    Thats my 2 cents,
    Amanda
    BizBla

Posting Permissions

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