npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

heheda

v5.2.0

Published

我的小鱼你醒了,还认识早晨吗?

Downloads

1

Readme

MySql数据库

数据库介绍

MySql安装

MySql管理客户端

客户端工具有很多 http://www.php100.com/html/dujia/2014/1219/8098.html

学习:

dbForge Studio For MySql

  • 网址:http://www.devart.com/dbforge/mysql/studio/

MySql常用命令行指令

创建数据库

     CREATE DATABASE 数据库名称;

创建表

    格式:
     CREATE TABLE 数据库名称.表名称 (
          字段名称 字段值的类型  是否允许为空 默认值 是否自增,
          ......字段设定
          ......字段设定
          设定主键
         
        )
            
    关键字说明:
        字段名称:字母数字_组合
        字段值的类型:int  : 整数类型 
                   varchar(255) : 255个长度的字符串类型
                   BOOL        : 真假类型
                   date         :日期类型,不带时间   
                   datetime    :日期带时间类型
                   time    :时间类型
                   float    :浮点型
                   text       :文本类型,长度比varchar要大得多

    举例:
    
      CREATE TABLE nodesystem.users (
          uid int NOT NULL AUTO_INCREMENT,
          uname varchar(255) DEFAULT NULL,
          upwd varchar(255) NOT NULL,
          uqq varchar(255) DEFAULT NULL,
          uemail varchar(255) DEFAULT NULL,
          PRIMARY KEY (uid)
        )

常用曾,删,查,改命令

新增数据命令

    命令格式:
    inert into 表名称(表字段1,字段2,....)
    values (表字段1的值,字段2的值,.....)
    
    举例:
    
    INSERT  INTO users(uname,upwd,uqq,uemail)
  VALUES ('admin', '738717afa5a7ea4cdda80d15c9ec017b','594475087','[email protected]');

查询数据命令

    命令格式:
    select * from 表名称 where 条件1              -> select * from users where uid =1
    select * from 表名称 where 条件1 and 条件2     -> select * from users where uid =1 and uname = 'admin'
    select * from 表名称 where 条件1 or 条件2     -> select * from users where uid =2 or uname = 'admin'
    select * from 表名称 order by 字段 asc(正序排列) -> select * from users order by uid asc
    select * from 表名称 order by 字段 desc(倒序排列 -> select * from users order by uid desc
    select * from 表名称 limt 整数 -> select * from users limit 5  表示获取前5行数据
    select * from 表名称 limt 开始整数,结束整数 -> select * from users limit 1,2 表示获取第1到第2行的数据
    
    组合用法:获取表 users中的uid=2或者uname='admin'的数据后 对uid进行倒叙排列,再获取前面2条数据
    SELECT * FROM users  where uid = 2 or uname = 'admin'  ORDER BY uid desc  LIMIT 2
     

更新数据命令

    命令格式:
    update 要更新的表名称 set 需要更新的表中的字段名称 = 字段值 where 条件字段 = 条件字段值    

    举例:
    下面命令表示:更新表users中uid=2这条数据的的uqq字段的值为1109892
    
    UPDATE users set uqq='1109892' WHERE uid = 2
    

删除数据命令

    命令格式:
    delete from 表名称 where 条件字段 = 字段值    

    举例:
    下面命令表示:删除表users中的uid=2的数据
    DELETE from  users WHERE uid = 2

NodeJS操作MySql数据库

可以利用名称为mysql这个nodejs第三方包来对mysql数据库中的表数据进行增,删,查,改操作

mysql包的使用