How to use add, delete, modify and check in phpcms
1. Check
1. select($where = '', $data = '*', $limit = '', $order = '', $group = '', $key='')
/** * 执行sql查询 * @param $where 查询条件[例`name`='$name'] * @param $data 需要查询的字段值[例`name`,`gender`,`birthday`] * @param $limit 返回结果范围[例:10或10,10 默认为空] * @param $order 排序方式 [默认按数据库默认方式排序] * @param $group 分组方式 [默认为空] * @param $key 返回数组按键名排序 * @return array 查询结果集数组 */
2. listinfo($where = '', $order = '', $page = 1, $pagesize = 20, $key='' , $setpages = 10,$urlrule = '',$array = array(), $data = '*')
/** * 查询多条数据并分页 * @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 排序方式 [默认按数据库默认方式排序] * @param $group 分组方式 [默认为空] * @return array/null 数据查询结果集,如果不存在,则返回空 */
4. query($sql)
/** * 直接执行sql查询 * @param $sql 查询sql语句 * @return boolean/query resource 如果为查询语句,返回资源句柄,否则返回true/false */
2. Add
1. insert($data, $ return_insert_id = false, $replace = false)
/** * 执行添加记录操作 * @param $data 要增加的数据,参数为数组。数组key为字段值,数组值为数据取值 * @param $return_insert_id 是否返回新建ID号 * @param $replace 是否采用 replace into的方式添加数据 * @return boolean */
2. insert_id()
/** * 获取最后一次添加记录的主键号 * @return int */
3. Change
3. update($data, $where = '')
/** * 执行更新记录操作 * @param $data 要更新的数据内容,参数可以为数组也可以为字符串,建议数组。 * 为数组时数组key为字段值,数组值为数据取值 * 为字符串时[例:`name`='phpcms',`hits`=`hits`+1]。 * 为数组时[例: array('name'=>'phpcms','password'=>'123456')] * 数组的另一种使用array('name'=>'+=1', 'base'=>'-=1');程序会自动解析为`name` = `name` + 1, `base` = `base` - 1 * @param $where 更新数据时的条件,可为数组或字符串 * @return boolean */
4. Delete
1. delete($where)
/** * 执行删除记录操作 * @param $where 删除数据条件,不充许为空。 * @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!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



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.

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.

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.

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]

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 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.

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.

MySql is a relational database management system that is very commonly used in web applications. In the entire web application development process, CRUD (Create, Delete, Modify and Check) operations are essential. This article will introduce how to quickly complete these operations in MySql. Add (Create) In MySql, we use the INSERTINTO statement to insert new rows. For example, we have a table called "users" with three columns: "id", "name" and "email". Now
