Microsoft Word - Sam's Teach Yourself MySQL in 21 Days - SAMS.doc

(singke) #1
the logged-in user with
an active connection

Creating and
Dropping Databases
mysql_create_db
Creates a MySQL
database
mysql_drop_db
Drops (deletes) a
MySQL database


Performing Queries


mysql_db_query (^) Sends a MySQL query
to a named MySQL
server
mysql_query (^) Sends an SQL query to
the already selected
MySQL server
Handling Results
from Queries
mysql_fetch_array
Fetches a result row as
an associative array
mysql_result (^) Returns result data
from a query
mysql_fetch_row (^) Returns a result row as
an enumerated array
mysql_affected_rows Returns the number of
affected rows in the
previous MySQL
INSERT/UPDATE/DEL
ETE operation
mysql_num_rows (^) Returns the number of
rows in result
mysql_fetch_field (^) Returns column
information from a
result and returns it as
an object
mysql_fetch_lengths
Returns the length of
each output in a result
mysql_fetch_object
Returns a result row as
an object
mysql_field_name (^) Gets the name of the
specified field in a
result
mysql_list_fields
Returns a list of MySQL
result fields
mysql_num_fields
Returns the number of
fields in result
mysql_field_seek (^) Sets result pointer to a
specified field offset
mysql_field_type (^) Returns the type of the
specified field in a
result

Free download pdf