discuz! x/Database function Operation method

Source: Internet
Author: User

discuz! x/Database function Operation method

Db::table ($tablename) Gets the correct prefixed table name, transforms the database handle, DB::d elete ($tablename, condition, number of bars limit) to delete data from the table
Db::insert ($tablename, data (array), whether the Insert ID is returned, whether the substitution is silent) insert data operation
Db::update ($tablename, data (array) condition) Update operation
Db::fetch (the queried resource) takes an associative array from the result set, noting that if two or more columns in the result have the same field names, the last column takes precedence.
Db::fetch_first ($SQL) fetch the first Data fetch Db::fetch_all ($sql) query and Fetch
Db::result_first ($sql) The first field value of a query result set db::query ($sql) normal query
Db::num_rows (resource after query) get record lumped number Db::_execute (command, parameter) execute MySQL class command Db::limit (n,n) return restriction string
Db::field (field name, $pid) returns the condition if the array returns an in condition Db::order (alias, method) sort

discuz! x/Database function Operation method

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.