亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

Home CMS Tutorial PHPCMS How to use add, delete, modify and check in phpcms

How to use add, delete, modify and check in phpcms

Feb 08, 2020 pm 03:42 PM
phpcms Add, delete, modify and check

How to use add, delete, modify and check in phpcms

1. Check

1. select($where = '', $data = '*', $limit = '', $order = '', $group = '', $key='')

/**
     * 執(zhí)行sql查詢
     * @param $where         查詢條件[例`name`='$name']
     * @param $data         需要查詢的字段值[例`name`,`gender`,`birthday`]
     * @param $limit         返回結(jié)果范圍[例:10或10,10 默認為空]
     * @param $order         排序方式    [默認按數(shù)據(jù)庫默認方式排序]
     * @param $group         分組方式    [默認為空]
     * @param $key          返回數(shù)組按鍵名排序
     * @return array        查詢結(jié)果集數(shù)組
     */

2. listinfo($where = '', $order = '', $page = 1, $pagesize = 20, $key='' , $setpages = 10,$urlrule = '',$array = array(), $data = '*')

/**
     * 查詢多條數(shù)據(jù)并分頁
     * @param $where
     * @param $order
     * @param $page
     * @param $pagesize
     * @return unknown_type
     */

3.get_one($where = '', $data = '*', $order = '', $group = '')

/**
     * 獲取單條記錄查詢
     * @param $where         查詢條件
     * @param $data         需要查詢的字段值[例`name`,`gender`,`birthday`]
     * @param $order         排序方式    [默認按數(shù)據(jù)庫默認方式排序]
     * @param $group         分組方式    [默認為空]
     * @return array/null    數(shù)據(jù)查詢結(jié)果集,如果不存在,則返回空
     */

4. query($sql)

/**
     * 直接執(zhí)行sql查詢
     * @param $sql                            查詢sql語句
     * @return    boolean/query resource        如果為查詢語句,返回資源句柄,否則返回true/false     */

2. Add

1. insert($data, $ return_insert_id = false, $replace = false)

/**
     * 執(zhí)行添加記錄操作
     * @param $data         要增加的數(shù)據(jù),參數(shù)為數(shù)組。數(shù)組key為字段值,數(shù)組值為數(shù)據(jù)取值
     * @param $return_insert_id 是否返回新建ID號
     * @param $replace 是否采用 replace into的方式添加數(shù)據(jù)
     * @return boolean
     */

2. insert_id()

/**
     * 獲取最后一次添加記錄的主鍵號
     * @return int 
     */

3. Change

3. update($data, $where = '')

/**
     * 執(zhí)行更新記錄操作
     * @param $data         要更新的數(shù)據(jù)內(nèi)容,參數(shù)可以為數(shù)組也可以為字符串,建議數(shù)組。
     *              為數(shù)組時數(shù)組key為字段值,數(shù)組值為數(shù)據(jù)取值
     *                         為字符串時[例:`name`='phpcms',`hits`=`hits`+1]。
     *                        為數(shù)組時[例: array('name'=>'phpcms','password'=>'123456')]
     *                        數(shù)組的另一種使用array('name'=>'+=1', 'base'=>'-=1');程序會自動解析為`name` = `name` + 1, `base` = `base` - 1
     * @param $where         更新數(shù)據(jù)時的條件,可為數(shù)組或字符串
     * @return boolean
     */

4. Delete

1. delete($where)

/**
     * 執(zhí)行刪除記錄操作
     * @param $where         刪除數(shù)據(jù)條件,不充許為空。
     * @return boolean     
     */

Related recommendations: phpcms tutorial

The above is the detailed content of How to use add, delete, modify and check in phpcms. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

PHP Tutorial
1488
72
How to jump to the details page in phpcms How to jump to the details page in phpcms Jul 27, 2023 pm 05:23 PM

How to jump to the details page in phpcms: 1. Use the header function to generate a jump link; 2. Loop through the content list; 3. Get the title and details page link of the content; 4. Generate a jump link.

How does Go language implement the addition, deletion, modification and query operations of the database? How does Go language implement the addition, deletion, modification and query operations of the database? Mar 27, 2024 pm 09:39 PM

Go language is an efficient, concise and easy-to-learn programming language. It is favored by developers because of its advantages in concurrent programming and network programming. In actual development, database operations are an indispensable part. This article will introduce how to use Go language to implement database addition, deletion, modification and query operations. In Go language, we usually use third-party libraries to operate databases, such as commonly used sql packages, gorm, etc. Here we take the sql package as an example to introduce how to implement the addition, deletion, modification and query operations of the database. Assume we are using a MySQL database.

What framework is phpcms? What framework is phpcms? Apr 20, 2024 pm 10:51 PM

PHP CMS is a PHP-based open source content management system for managing website content. Its features include ease of use, powerful functionality, scalability, high security, and free open source. It can save time, improve website quality, enhance collaboration and reduce development costs, and is widely used in various websites such as news websites, blogs, corporate websites, e-commerce websites and community forums.

Isn't phpcms free? Isn't phpcms free? Mar 01, 2023 am 10:24 AM

phpcms is not completely free. phpcms is an open source cms system, but open source does not mean free. It has two versions: free version and commercial version. The free version is limited to personal non-commercial use, while the commercial version requires purchasing a license; individuals can use it for research, and if it is commercial application , you need to pay a certain fee.

WeChat Login Integration Guide: PHPCMS Practical Combat WeChat Login Integration Guide: PHPCMS Practical Combat Mar 29, 2024 am 09:18 AM

Title: WeChat Login Integration Guide: PHPCMS in Action In today’s Internet era, social login has become one of the essential functions of a website. As one of the most popular social platforms in China, WeChat’s login function is also used by more and more websites. This article will introduce how to integrate the WeChat login function in the PHPCMS website and provide specific code examples. Step 1: Register a WeChat Open Platform Account First, we need to register a developer account on the WeChat Open Platform and apply for the corresponding development permissions. Log in [WeChat open platform]

Java List Interface Example Demonstration: Data Operation to Implement Add, Delete, Modify and Check Operations Java List Interface Example Demonstration: Data Operation to Implement Add, Delete, Modify and Check Operations Dec 20, 2023 am 08:10 AM

The JavaList interface is one of the commonly used data structures in Java, which can easily implement data addition, deletion, modification and query operations. This article will use an example to demonstrate how to use the JavaList interface to implement data addition, deletion, modification and query operations. First, we need to introduce the implementation class of the List interface in the code, the common ones are ArrayList and LinkedList. Both classes implement the List interface and have similar functions but different underlying implementations. ArrayList is based on array real

PHPCMS username security setting strategy revealed PHPCMS username security setting strategy revealed Mar 14, 2024 pm 12:06 PM

PHPCMS user name security setting strategy revealed In website development, user account security has always been an aspect that developers attach great importance to. The security settings of the username are also crucial, because the username is not only the user's login credentials, but may also expose the user's personal information and even cause security risks. This article will reveal the username security setting strategy in PHPCMS and give specific code examples for developers to refer to. 1. Prevent common usernames. In order to improve the security of usernames, developers should prevent users from using excessive

What does phpcms mean? What does phpcms mean? Apr 20, 2024 pm 10:39 PM

PHPCMS is a free and open source content management system (CMS) that features: open source, modularity, flexibility, user-friendliness and community support. It can be used to create various types of websites, including corporate websites, e-commerce websites, blogs, and community forums. Technical requirements include: PHP 5.6 or higher, MySQL, MariaDB or PostgreSQL database, and Apache or Nginx web server.

See all articles