Common PHP function index_php tutorial recommended

Source: Internet
Author: User
Tags acos
Common PHP function indexes are recommended.★Abs: obtains the absolute value. Syntax: mixedabs (mixednumber );★Acos function: Get the arc cosine syntax: floatacos (floatarg );★Ada_afetch: Get number

★Abs

Purpose: obtain the absolute value.

Syntax: mixed abs (mixed number );

★Acos

Purpose: obtain the arccosine value.

Syntax: float acos (float arg );

★Ada_afetch

Purpose: obtain the returned columns of the database.

Syntax: int ada_afetch (int result_id, int rownumber, array result_array );

Note: put the column data returned by the database into an array variable. The result_id parameter is the ID value returned by the database. The rownumber parameter is the specified get column. The result_array parameter is the data array of the obtained column. it is usually preceded by the "&" symbol.

★Ada_autocommit

Purpose: enable automatic update.

Syntax: int ada_autocommit (int connection_id, int [OnOff]);

Note: This function is used to enable or disable the automatic update function. The connection_id parameter is the ID of the database link. The default value of OnOff is on, which indicates that the automatic update function is enabled. if you want to disable the function, it is set to off.

★Ada_close

Purpose: disable the Adabas D link.

Syntax: void ada_close (int connection_id );

Note: This function is used to close the link with the Adabas D database. The connection_id parameter is the database link code ID value.

★Ada_commit

Role: change the Adabas D database.

Syntax: int ada_commit (int connection_id );

Note: This function is not required if ada_autocommit () is set to automatically update the database.

★Ada_connect

Purpose: link to the Adabas D database.

Syntax: int ada_connect (string dsn, string user, string password );

Note: The return value is the code ID of the link. The dsn parameter is the data source name. The user and password parameters are the linked accounts and passwords respectively.

★Ada_exec

Purpose: execute SQL commands.

Syntax: int ada_exec (int connection_id, string query );

Description: The connection_id parameter is the ID value of the Adabas D link code. The query parameter is the command to be executed. The returned value is the Result ID.

★Ada_fetchrow

Purpose: obtain a column returned by the database.

Syntax: int ada_fetchrow (int result_id, int [row_number]);

Note: The result_id parameter is Adabas D and returns the ID value. The rownumber parameter is a specified column, which can be omitted.

★Ada_fieldname

Purpose: obtain the field name.

Syntax: string ada_fieldname (int result_id, int field_number );

Note: The result_id parameter is the ID value returned by the Adabas D database. The field_number parameter is the specified field.

★Ada_fieldtype

Purpose: obtain the field type.

Syntax: string ada_fieldtype (int result_id, int field_number );

★Ada_freeresult

Purpose: Release the memory used by the returned data.

Syntax: int ada_freeresult (int result_id );

Note: The result_id parameter is the ID value returned by Adabas D.

★Ada_numfields

Purpose: obtain the number of fields.

Syntax: int ada_numfields (int result_id );

Note: The result_id parameter is the ID value returned by Adabas D. If an error occurs,-1 is returned.

★Ada_numrows

Purpose: obtain the number of records returned from the query results.

Syntax: int ada_numrows (int result_id );

Note: The result_id parameter is the ID value returned by Adabas D. If an error occurs,-1 is returned.

★Ada_result

Purpose: obtain the returned results.

Syntax: string ada_result (int result_id, mixed field );

Note: The result_id parameter is the ID value returned by Adabas D. The field parameter can be a number, indicating the serial number of the specified field, or a string. it can be the name of the specified field.

★Ada_resultall

Purpose: return the query results in the form of HTML tables.

Syntax: int ada_resultall (int result_id, string [format]);

Note: The result_id parameter is the ID value returned by Adabas D. The format parameter is a special configuration value of the table, which can be omitted.

★Ada_rollback

Purpose: cancel the current query operation.

Syntax: int ada_rollback (int connection_id );

Note: If the operation is successful, true is returned. otherwise, false is returned.


Http://www.bkjia.com/PHPjc/446018.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/446018.htmlTechArticle★Abs: obtains the absolute value. Syntax: mixed abs (mixed number );★Acos function: Get the arc cosine syntax: float acos (float arg );★Ada_afetch: gets the number...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.