Get the App
SLTechnology News&Howtos  ›  Development  › 

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

Shulou Source: shulou.com Published: 2022-05-31 18:22:54 11月16日 Update

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

Tags: Data database character set link success Anta learning query output run content structure special step update selection code that is ideas situation Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Apple Docker Shulou Information vpn