Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize original addition, deletion, modification and search based on PHP

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "how to achieve native additions, deletions, modifications and queries based on PHP". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's way of thinking to study and learn "how to achieve native additions, deletions, modifications and queries based on PHP".

1. Code 1, sql-- phpMyAdmin SQL Dump-- version 4.5.1 Host-http://www.phpmyadmin.net---- Host: 127.0.0.1 muri-Generation Time: 2022-03-19 19V 1640 Muray-Server version: 10.1.13 MariaDB Generation Time-PHP Version: 5.6.21SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+ 00:00" / *! 40101 SET @ OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT * /; / *! 40101 SET @ OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS * /; / *! 40101 SET @ OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION * /; / *! 40101 SET NAMES utf8mb4 * / -Database: `a`-table structure `search`-- CREATE TABLE `search` (`id` int (20) NOT NULL, `content` text COLLATE utf8_vietnamese_ci NOT NULL, `type` varchar (100) COLLATE utf8_vietnamese_ci NOT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_vietnamese_ci -dump the data in the table `search`-- INSERT INTO `search` (`id`, `content`, `type`) VALUES (32, 'aaa','), (33, 'Chen Yegui likes Anta', 'Anta') -structure of the table `type`-- CREATE TABLE `type` (`id` int (11) NOT NULL, `type` varchar (12) COLLATE utf8_vietnamese_ci NOT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_vietnamese_ci -dump the data in the table `type`-- INSERT INTO `type` (`id`, `type`) VALUES (1, 'Anta'), (2, 'special step');-Indexes for dumped tables- Indexes for table `search`-ALTER TABLE `search` ADD PRIMARY KEY (`id`);-Indexes for table `type`-ALTER TABLE `type` ADD PRIMARY KEY (`id`) -use AUTO_INCREMENT- to use table AUTO_INCREMENT `search`-- ALTER TABLE `search` MODIFY `id` int (20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=34;---- use table AUTO_INCREMENT `type`-- ALTER TABLE `type` MODIFY `id` int (11) NOT NULL AUTO_INCREMENT, automatic INCREMENT3 potential account 40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT * /; / *! 40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS * / / *! 40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION * /; 2. List page (index.php) Document id items

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report