PHP MySQL functions

There are many PHP functions which works in MySQL to execute queries. PHP & MySQL has became most popular web scripting language in internet today because of these functions and flexibility of PHP program. There are many popular scripts for forums, content management, classified programs, e-commerce sites etc. runs in PHP scripts by using MySQL database. To manage these scripts we use these PHP functions.

We will discuss these functions in detail with examples to make it simple to understand.

default_password_lifetime

Set the value in days for user or for global to expire the password.

mysql_affected_rows

How many rows or records get updated or deleted or affected by a given query.

mysql_auto_increment

Adding one incremented auto number to each record once added.

mysql_close

Closing one open connection to MySQL database.

mysql_connect

Connecting string to store userid and password and database name to connect to MySQL

mysql_create_db

Create a database in MySQL

mysql_db_name

List the name of all databases in MySQL

mysql_errno

Associated error number of each mysql query

mysql_error

Error message after executing a query

mysql_fetch_field

we can get the type of field with all other details about the field

mysql_fetch_lengths

get the length of data used in all fields of a record

mysql_fetch_row

get the row of data from a MySQL table

mysql_field_flags

getting the field flags associated with the field.

mysql_field_type

Type of field used in MySQL table.

mysql_insert_id

Get the auto increment id of the last inserted record

mysql_list_dbs

List of database in MySQL

mysql_list_tables

List of tables present in a database

mysql_num_fields

Number of fields present in a query or in a table

mysql_num_rows

Getting the total number of rows in a query or in a table

mysql_query

Function to execute any query statement in MySQL database mysql_field_len
mysql_field_name
MySQL Version

Subscribe to our YouTube Channel here


Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com

    Post your comments , suggestion , error , requirements etc here





    SQL Video Tutorials










    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer