home about us contact us

free scripts advanced scripts online tools great books web related tutorials contributed tutorials news archive geek toys!

help forum live chat help

PHP Reference.

PHP MySQL Database functions.
A (hopefully useful) list of some common PHP MySQL functions, what they do, and an example usage.

mysql_connect()Creates a database connection mysql_connect( "mysql_server_hostname", "user", "passwd");
mysql_pconnect() Creates a persistant database connection mysql_pconnect( "mysql_server_hostname", "user", "passwd");
mysql_select_db() Selects the database to connect to. mysql_select_db( "DB_name")
mysql_query() Contains the SQL query. $query= mysql_query( "SELECT * FROM some_table WHERE Name='$somename'")
mysql_fetch_row() fetches a row into an array $array = mysql_fetch_row( $result )
mysql_fetch_array() Fetches the requested data into an associative or numeric array. while ($row= mysql_fetch_array( $result ))
mysql_num_rows() Returns the number of rows returned. $num_rows = mysql_num_rows($query);
mysql_create_db() Create a Database. mysql_create_db( "DB_name");
mysql_drop_db() Delete a Database. mysql_drop_db( "DB_name");
mysql_free_result() Frees memory identified with the result identifier.
(Usually not necessary).
mysql_free_result( $result );

This site is totally free to use, you have absolutely no moral or legal obligations to help us continue.
There are however, some costs involved in running the site.

<random humor>
Plus we have nearly doubled in visitors in the past week, (We hope :-).
</random humor>

So if this site helped you find your way, perhaps you could consider contributing to our costs. Whatever amount you feel this site was worth to you would be just wonderful.
Use PayPal if you do decide to share and help us with the costs and in appreciation for our time and attention, or alternatively buy a book from our Bookstore..

  Time  in  Don's  part  of the world is:     Tue, April 23, 2024 at 06:53 AM
  Time in Franki's part of the world is:     Tuesday, April 23, 2024 at 7:53 PM
 Don't worry neither one sleeps very long!

privacy policy :: support us :: home :: live chat help
contact us :: forum ::tutorials :: bookstore :: Site Map

      Valid XHTML 1.0!             powered by Apache Server
Pic 3 Pic 3


CIGHTML Firefox Thunderbird ClamWin WordPress SpyBot S&D TheGIMP Apache for Windows Registry Cleaners More cool stuff: