学习目的:学会构建数据库
在ASP中,如果是ACCESS数据库你可以直接打开ACCESS来编辑MDB文件,如果是SQL SERVER你可以打开企业管理器来编辑SQL SERVER数据库,但是在PHP中,MY SQL的命令行编辑可能会令初学者感到很麻烦,不要紧,你下载一个PHPMYADMIN安装一下,以后建立编辑数据库可以靠它了。
下面说一下它的使用。
进入了phpmyadmin后,我们首先需要建立一个数据库,Language (*) 这里选择中文简体,然后在左边的 创建一个新的数据库 这里填写数据库名字,点击创建即可。
然后在左边下拉菜单中选择那个已经创建的数据库。在下面的
在数据库 shop 中创建一个新表 :
名字 :
字段数 :
中填写表名字和大致你认为的字段数(不够或者多了都不要紧,以后可以再添加或者缺省),按执行。
然后就可以开始建立表了。
第一栏是字段的名字;第二栏选择字段类型:
我们常用的是以下几个:
1)VARCHAR,文本类型
2)INT,整数类型
3)FLOAT,浮点数类型
4)DATE,日期型
5)大家或许会问,自动添加的ID在哪里?这个只要选择INT类型,在后面的额外中选择 auto_increment 就可以了。
建立了表以后,可以在左边看到你建立的表,点击以后,你可以:
1)按右边的结构:查看修改表结构
2)按右边的浏览:查看表中的数据
3)按右边的SQL:运行SQL语句
4)按右边的插入:插入一行记录
5)按右边的清空:删除表中所有记录
6)按右边的删除:删除表
还有一个很重要的功能就是导入和导出,当我们本机做好了程序和数据库的时候,需要在服务器上也有一个本地镜像,如果是ASP的ACCESS简单了,直接上传MDB文件即可,如果是SQL SERVER也可以连接远端服务器进行导入。那么MY SQL中你可以导出所有的SQL语句,到了远端服务器的PHPMYADMIN上,创建数据库后按SQL,粘帖你刚才复制下来的所有本级生成的SQL语句即可。
今天就说到这里,明天继续说数据库操作。

Long URLs, often cluttered with keywords and tracking parameters, can deter visitors. A URL shortening script offers a solution, creating concise links ideal for social media and other platforms. These scripts are valuable for individual websites a

Laravel simplifies handling temporary session data using its intuitive flash methods. This is perfect for displaying brief messages, alerts, or notifications within your application. Data persists only for the subsequent request by default: $request-

This is the second and final part of the series on building a React application with a Laravel back-end. In the first part of the series, we created a RESTful API using Laravel for a basic product-listing application. In this tutorial, we will be dev

Laravel provides concise HTTP response simulation syntax, simplifying HTTP interaction testing. This approach significantly reduces code redundancy while making your test simulation more intuitive. The basic implementation provides a variety of response type shortcuts: use Illuminate\Support\Facades\Http; Http::fake([ 'google.com' => 'Hello World', 'github.com' => ['foo' => 'bar'], 'forge.laravel.com' =>

The PHP Client URL (cURL) extension is a powerful tool for developers, enabling seamless interaction with remote servers and REST APIs. By leveraging libcurl, a well-respected multi-protocol file transfer library, PHP cURL facilitates efficient execution of various network protocols, including HTTP, HTTPS, and FTP. This extension offers granular control over HTTP requests, supports multiple concurrent operations, and provides built-in security features.

Do you want to provide real-time, instant solutions to your customers' most pressing problems? Live chat lets you have real-time conversations with customers and resolve their problems instantly. It allows you to provide faster service to your custom

The 2025 PHP Landscape Survey investigates current PHP development trends. It explores framework usage, deployment methods, and challenges, aiming to provide insights for developers and businesses. The survey anticipates growth in modern PHP versio

In this article, we're going to explore the notification system in the Laravel web framework. The notification system in Laravel allows you to send notifications to users over different channels. Today, we'll discuss how you can send notifications ov


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

Dreamweaver Mac version
Visual web development tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

SublimeText3 Chinese version
Chinese version, very easy to use

SublimeText3 English version
Recommended: Win version, supports code prompts!

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment
