Database Articles

  Home arrow Database Articles arrow Page 7 - Intro to Databases
DATABASE ARTICLES

Intro to Databases
By: lig
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 3
    2005-10-18

    Table of Contents:
  • Intro to Databases
  • Database Basics
  • SQL - Structured Query Language
  • Working with Databases
  • Connecting to the database and selecting the database
  • Sending a Query to the Database and Getting the Results
  • Freeing the Results and Closing Down
  • Conclusion

  •  
     

    SEARCH CODEWALKERS

    TOOLS YOU CAN USE

    advertisement

    Intro to Databases - Freeing the Results and Closing Down


    (Page 7 of 8 )

    Almost finished. Only thing left is to release the results of the queries and closing the connection to the database.

    Natively

    To release the results and close the connection is quite simple. Simply call the mysql_free_results() function and then call the mysql_close() function. That is all - nothing else.

    <?php
    // notice that the variable is the one holding the connection to the actual results
    mysql_free_result($result);
    // notice that the variable is the one returned after we selected the database
    mysql_close($link); 
    ?>

    PEAR DB

    This is done just as easily as the native functions - so relax. To free the results from the query just call the free method from the DB_result class and then call the disconnect method from the DB class. After that - your done. Congratulations.

    <?php
    $result
    -&gt;free();
    $db-&gt;disconnect();
    ?>

    More Database Articles Articles
    More By lig

    blog comments powered by Disqus

    DATABASE ARTICLES ARTICLES

    - Completing a Book Inventory Management System
    - Uploading Images for a Book Inventory Manage...
    - Finishing the Add Book Story for a Book Inve...
    - Integration Testing for a Book Inventory Man...
    - User Stories for a Book Inventory Management...
    - Unit Testing a Book Inventory Management Sys...
    - Testing a Book Inventory Management System
    - Implementing Models for a Book Inventory Man...
    - Book Inventory Application: Publishers and B...
    - Handling Publishers in a Book Inventory Mana...
    - Publisher Administration for Book Inventory ...
    - Book Inventory Management
    - Using the SQL Reference Manual
    - Using Oracle SQL Developer with SQL Statemen...
    - Fixing Errors with Oracle SQL Developer


    © 2003-2012 by Developer Shed. All rights reserved. DS Cluster 9 - Follow our Sitemap