一、HelloWorld

  1. pygame.init() #初始函数,使用pygame的第一步;
  2. pygame.display.set_mod((600,500),032) #生成主屏幕screen;第一个参数是屏幕大小,第二个0表示不使用特性,可用FULLSCREEN,RESIZEBLE,NOFRAME,DOUBLEBUF(双缓冲,使用时需用pygame.display.flip()来刷新屏幕)等替换,32表示色深;
  3. pygame.display.set_caption("string") #命名
  4. pygame.display.update() #刷新
  5. pygame.display.list_modes() #查看本地显示器支持的分辨率;
  6. screen.fill(0,0,0) #填充

二、绘图

pygame.draw.rect(surface,color,Rect,width=0) 画一个矩形,Rect为两个坐标元组的元组;

(一)rect(矩形)参数属性

  1. r.left 左边x坐标的整数值
  2. r.right 右边x坐标的整数值
  3. r.top  顶部y坐标的整数值
  4. r.bottom   底部y坐标的整数值
  5. r.centerx 中央x坐标整数值
  6. r.centery 中央y坐标整数值
  7. r.width 宽度
  8. r.height 高度
  9. r.size 即元组(width,height)
  10. r.topleft (left,top)
  11. r.topright (right,top)
  12. r.bottomleft (left,bottom)
  13. r.bottomright (right,bottom)
  14. r.midleft (left,centery)
  15. r.midright (right,centery)
  16. r.midtop (centerx,top)
  17. r.midbottom (centerx,bottom)

(二)其他形状

  1. pygame.draw.polygon(surface,color,pointlist,width=0)    多边形
  2. pygame.draw.circle(surface,color,pos,radius,width=0)
  3. pygame.draw.ellipse(surface,color,Rect,width=0)    椭圆
  4. pygame.draw.arc(surface,color,Rect,start_angle,stop_angle,width=1) 圆弧
  5. pygame.draw.line(surface,color,start_pos,end_pos,width=1)    直线;
  6. pygame.draw.lines(surface,color,closed,pointlist,width=1)    closed为一bool值,表示是否封闭;
  7. pygame.draw.aaline(surface,color,start_pos,end_pos,width=1) 一根平滑的线;
  8. pygame.draw.aalines(surface,color,closed,pointlist,width=1) 一系列平滑的线;

Normal
0

7.8 磅
0
2

false
false
false

EN-US
ZH-CN
X-NONE

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
mso-bidi-font-size:11.0pt;
font-family:等线;
mso-ascii-font-family:等线;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:等线;
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:等线;
mso-hansi-theme-font:minor-latin;
mso-font-kerning:1.0pt;}

(三)font(以图形模式输出文本)

1.pygame.font.Font("字体","字号",*)

2.my_font.render(text,True,(255,255,255))        使用已有的文本创建一个位图image,返回值为一个image;对于位图可用get_height(),get_width()的方法获得高与宽;True表示是否抗锯齿,第三个为字体颜色,还可以有第四个为背景色,没有时就为默认的透明;

3.Font()       使用的是字体文件,要使用系统中的字体需用SysFont(),但一些中文扩展的字体不是很好用。

4.screen.blit(image,(100,100))             将位图绘制到屏幕上,screen为建立的主屏;

5.pygame.font.get_fonts()           查看当前系统所有可使用的字体

Normal
0

7.8 磅
0
2

false
false
false

EN-US
ZH-CN
X-NONE

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
mso-bidi-font-size:11.0pt;
font-family:等线;
mso-ascii-font-family:等线;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:等线;
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:等线;
mso-hansi-theme-font:minor-latin;
mso-font-kerning:1.0pt;}

三、图片处理

pygame支持的图片格式有:JPEG,PNG,GIF,BMP,PCX,TGA,TIF,LBM,PBM,XPM

  1. pygame.image.load("图片路径").conver() 将图片处理为surface对象,如果使用conver_alpha()则保留了Alpha通道信息(可透明),使用时用blit()函数来添加到显示屏
  2. pygame.Surface((250,250),flags,depth) 创建一个surface对象,如果不指定尺寸则会创建和屏幕一样大小;flags为可选,有SRCALPHA(保留Alpha通道)、HWSURFACE(优化)两个选择,depth为色深;
  3. screen.subsurface((0,0),(80,80))    子表面对象;
  4. screen.set_at(pos,color)    设置一个像素的色彩;
  5. screen.get_at(pos)     获取某一像素的色彩,不过此操作的反应比较慢;
  6. pygame.transform.scale(surface,(width//2,height//2) 缩放图片
  7. pygame.transform.smoothscale(surface,(width,height) 缩放图片,比scale慢,但效果更好;
  8. pygame.sprite.Group()    精灵组,一个简单的实体容器;
  9. pygame.sprite.add(sprite) 添加精灵对象;
  10. pygame.sprite.update(ticks)
  11. pygame.sprite.draw(screen)
  12. pygame.sprite.collide_rect(arrow,dragon) 冲突
  13. screen.set_clip(0,400,200,600) 设定裁剪区域;
  14. screen.get_clip()       获得裁剪区域

Normal
0

7.8 磅
0
2

false
false
false

EN-US
ZH-CN
X-NONE

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
mso-bidi-font-size:11.0pt;
font-family:等线;
mso-ascii-font-family:等线;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:等线;
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:等线;
mso-hansi-theme-font:minor-latin;
mso-font-kerning:1.0pt;}

四、事件event

  1. pygame.event.get() 获取事件的返回值,使用event.type == 进行区分
  2. pygame.event.wait() 等待发生一个事件才会继续下去;
  3. pygame.event.poll() 会根据现在的情形返回一个真实的事件
  4. pygame.event.set_blocked(事件名) 过滤
  5. pygame.event.set_allowed() 允许事件

Normal
0

7.8 磅
0
2

false
false
false

EN-US
ZH-CN
X-NONE

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
mso-bidi-font-size:11.0pt;
font-family:等线;
mso-ascii-font-family:等线;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:等线;
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:等线;
mso-hansi-theme-font:minor-latin;
mso-font-kerning:1.0pt;}

自定义事件

  1. my_event = pygame.event.Event(KEYDOWN,key=K_SPACE,mod=0,unicode=u' ')
  2. pygame.event.post(my_event)

Normal
0

7.8 磅
0
2

false
false
false

EN-US
ZH-CN
X-NONE

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
mso-bidi-font-size:11.0pt;
font-family:等线;
mso-ascii-font-family:等线;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:等线;
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:等线;
mso-hansi-theme-font:minor-latin;
mso-font-kerning:1.0pt;}

pygame所有事件type

  1. QUIT 退出;
  2. ACTIVEEVENT  pygame被激活或隐藏;
  3. KEYDOWN   区分不同键 event.key == pygame.K_a,pygame使用keys=pygame.key.get_pressed()来轮询键盘接口,返回的是所有按下键值的元组;用keys[K_b]方式来核对键值;K_b也可以是键值Unicode码;如果mod & KMOD_CTRL为真的话表示同时按下Ctrl键;key.get_mods()组合键,key.set_repeat()重复事件;key.name()接受键值返回键名;
  4. KEYUP 按键放开
  5. MOUSEMOTION  event.pos,event.rel,event.buttons属性,用mouse_x,mouse_y = event.pos进行确认,pygame.mouse.get_pos()返回鼠标的当前位置,pygame.mouse.get_rel()获取鼠标相对移动,pygame.mouse.get_pressed()返回按钮状态数组(鼠标三个键的状态)
  6. mouse.set_visible(False) 使鼠标不可见;
  7. event.set_grab(True) 使鼠标不会跑出窗口
  8. mouse.set_pos() 设置鼠标位置
  9. mouse.get_focused() 如果鼠标在pygame窗口内有效,返回True
  10. mouse.set_cursor() 设置鼠标默认光标式样;
  11. mouse.get_cursor() 获取鼠标默认光标式样;
  12. MOUSEBUTTONUP 鼠标放开
  13. MOUSEBUTTONDOWN 鼠标按下
  14. JOYAXISMOTION x手柄移动
  15. JOYBALLMOTION 所有手机移动
  16. JOYHATMOTION hat手柄移动
  17. JOYBUTTONUP 手柄按键放开
  18. JOYBUTTONDOWN 手柄按键按下
  19. VIDEORESIZE 窗口缩放;
  20. VIDEOEXPOSE 窗口部分公开;
  21. USEREVENT 触发了一个用户事件;

Normal
0

7.8 磅
0
2

false
false
false

EN-US
ZH-CN
X-NONE

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
mso-bidi-font-size:11.0pt;
font-family:等线;
mso-ascii-font-family:等线;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:等线;
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:等线;
mso-hansi-theme-font:minor-latin;
mso-font-kerning:1.0pt;}

五、异常捕捉

  1. try:
  2. screen = pygame.display.set_mode(SCREEN_SIZE)
  3. except pygame.error,e:
  4. print("Can't create the display :-(")
  5. print(e)
  6. exit()

Normal
0

7.8 磅
0
2

false
false
false

EN-US
ZH-CN
X-NONE

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
mso-bidi-font-size:11.0pt;
font-family:等线;
mso-ascii-font-family:等线;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:等线;
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:等线;
mso-hansi-theme-font:minor-latin;
mso-font-kerning:1.0pt;}

六、时间

  1. clock = pygame.time.Clock() 初始化一个clock对象
  2. clock.tick() 返回一个上次调用的时间,以毫秒为单位
  3. clock.tick(30) 控制游戏绘制的最大帧率为30

Normal
0

7.8 磅
0
2

false
false
false

EN-US
ZH-CN
X-NONE

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
mso-bidi-font-size:11.0pt;
font-family:等线;
mso-ascii-font-family:等线;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:等线;
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:等线;
mso-hansi-theme-font:minor-latin;
mso-font-kerning:1.0pt;}

七、声音

(一)sound对象

Normal
0

7.8 磅
0
2

false
false
false

EN-US
ZH-CN
X-NONE

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
mso-bidi-font-size:11.0pt;
font-family:等线;
mso-ascii-font-family:等线;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:等线;
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:等线;
mso-hansi-theme-font:minor-latin;
mso-font-kerning:1.0pt;}

pygame.mixer.Sound("文件")  读取声音对象sound,格式只有wav和ogg两种;

对象方法:

  1. fadeout()        淡出时间,可用参数为毫秒;
  2. get_lengh()         获得声音文件长度,以秒为单位;
  3. get_num_channels()     声音要播放的次数;
  4. play(loop,maxtime)     对读取的声音对象可执行播放操作,loop为-1表示无限循环,1表示重复两次,maxtime表示多少毫秒后结束;返回一个Channel对象,失败则返回None;
  5. set_volum()         设置音量;
  6. stop()          停止播放;
  7. pygame.mixer.music   背景音乐处理方法
  8. pygame.mixer.music.load() 加载文件可为mp3ogg格式;
  9. pygame.mixer.music.play() 播放
  10. pygame.mixer.music.stop() 停止,还有pause()和unpause()方法

(二)Channels对象

Normal
0

7.8 磅
0
2

false
false
false

EN-US
ZH-CN
X-NONE

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
mso-bidi-font-size:11.0pt;
font-family:等线;
mso-ascii-font-family:等线;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:等线;
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:等线;
mso-hansi-theme-font:minor-latin;
mso-font-kerning:1.0pt;}

pygame.mixer.get_num_channels()    获取当前系统可同时播放的声道数;pygame中默认为8;

对象方法:

  1. fadeout()    设置淡出时间
  2. get_busy()    如果正在播放,返回True;
  3. set_endevent() 设置播放完毕时要做的event;
  4. get_endevent() 获取播放完毕时要做的event,如果没有则返回None;
  5. get_queue()   获得队列中的声音,如果没有则返回None;
  6. set_volume()   设置音量;
  7. get_volume() 获得音量;
  8. pause()   暂停播放;
  9. unpause()    继续播放;
  10. play()    播放;
  11. stop()    停止播放;
  12. queue()   将一个Sound对象加入队列,在当前声音播放完毕后播放;
  13. set_num_channels() 自定义声道数;

(三)music对象

Normal
0

7.8 磅
0
2

false
false
false

EN-US
ZH-CN
X-NONE

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
mso-bidi-font-size:11.0pt;
font-family:等线;
mso-ascii-font-family:等线;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:等线;
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:等线;
mso-hansi-theme-font:minor-latin;
mso-font-kerning:1.0pt;}

pygame.mixer.pre_init(frequency,size,stereo,buffer) 声音系统初始化,第一个为采样率,第二个为量化精度,第三为立体声效果,第四为缓冲;

对象方法:

  1. fadeout()    设置淡出时间
  2. set_endevent() 设置播放完毕后事件
  3. get_endevent() 获取播放完毕后进行的事件;
  4. set_volume() 设置音量;
  5. get_volume() 获取音量;
  6. load()    加载音乐文件;
  7. rewind()    从头开始播放;
  8. get_pos() 获得当前播放的位置,以毫秒为单位;

Normal
0

7.8 磅
0
2

false
false
false

EN-US
ZH-CN
X-NONE

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
mso-bidi-font-size:11.0pt;
font-family:等线;
mso-ascii-font-family:等线;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:等线;
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:等线;
mso-hansi-theme-font:minor-latin;
mso-font-kerning:1.0pt;}

pygame模块参数汇总(python游戏编程)的更多相关文章

  1. Python游戏编程入门

    <Python游戏编程入门>这些文章负责整理在这本书中的知识点.注意事项和课后习题的尝试实现.并且对每一个章节给出的最终实例进行分析和注释. 初识pygame:pie游戏pygame游戏库 ...

  2. Python游戏编程入门 中文pdf扫描版|网盘下载内附地址提取码|

    Python是一种解释型.面向对象.动态数据类型的程序设计语言,在游戏开发领域,Python也得到越来越广泛的应用,并由此受到重视. 本书教授用Python开发精彩游戏所需的[]为重要的该你那.本书不 ...

  3. 《Python游戏编程快速上手》|百度网盘免费下载|Python基础编程

    <Python游戏编程快速上手>|百度网盘免费下载| 提取码:luy6 Python是一种高级程序设计语言,因其简洁.易读及可扩展性日渐成为程序设计领域备受推崇的语言. 本书通过编写一个个 ...

  4. 分享《Python 游戏编程快速上手(第3版)》高清中文版PDF+高清英文版PDF+源代码

    通过编写一个个小巧.有趣的游戏来学习Python,通过实例来解释编程的原理的方式.14个游戏程序和示例,介绍了Python基础知识.数据类型.函数.流程控制.程序调试.流程图设计.字符串操作.列表和字 ...

  5. 《Python游戏编程快速上手》——1.3 如何使用本书

    本节书摘来自异步社区<Python游戏编程快速上手>一书中的第1章,第1.3节,作者[美] Al Sweigart(斯维加特),李强 译,更多章节内容可以访问云栖社区"异步社区& ...

  6. 【python游戏编程之旅】第一篇---初识pygame

    本系列博客介绍以python+pygame库进行小游戏的开发.有写的不对之处还望各位海涵. 一.pygame简介 Pygame 是一组用来开发游戏软件的 Python 程序模块,基于 SDL 库的基础 ...

  7. python编程学习--Pygame - Python游戏编程入门(0)---转载

    原文地址:https://www.cnblogs.com/wuzhanpeng/p/4261015.html 引言 博客刚开,想把最近学习的东西记录下来,算是一种笔记.最近打算开始学习Python,因 ...

  8. Pygame - Python游戏编程入门(0) 转

    博客刚开,想把最近学习的东西记录下来,算是一种笔记.最近打算开始学习Python,因为我感觉Python是一门很有意思的语言,很早以前就想学了(碍于懒),它的功能很强大,你可以用它来做科学运算,或者数 ...

  9. Pygame - Python游戏编程入门

    >>> import pygame>>> print(pygame.ver)1.9.2a0 如果没有报错,应该是安装好了~ 如果报错找不到模块,很可能是安装版本的问 ...

随机推荐

  1. 应用jfinal时要注意区分Db.query和Db.find

    jfinal有一个特别好的地方,sql查询的时候可以直接查record.但是要注意query和find的区别. query返回的是List<object>,find返回的才是List< ...

  2. awk例子

     ls |awk -F . '{print $1}'|awk -F '-[0-9]' '{print $1}' 

  3. 有用的Javascript,长期更新...

    1,点击目标区域以外隐藏,运用场景:点击遮罩层,弹层关闭. // 点击目标区域以外隐藏 $(document).on("click", function (event) { var ...

  4. EF记录统一添加创建,修改时间

    public class BaseEntity { public DateTime? DateCreated { get; set; } public string UserCreated { get ...

  5. java基础学习:JavaWeb之Cookie和Session

    一.会话概述 1.1.什么是会话? 会话可简单理解为:用户开一个浏览器,点击多个超链接,访问服务器多个web资源,然后关闭浏览器,整个过程称之为一个会话其中不管浏览器发送多少请求,都视为一次会话,直到 ...

  6. HDU 3535 AreYouBusy (混合背包之分组背包)

    题目链接 Problem Description Happy New Term! As having become a junior, xiaoA recognizes that there is n ...

  7. GRUB (简体中文)

    原文链接:https://wiki.archlinux.org/index.php/GRUB_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87) 前言 引导程序是计算机启动时 ...

  8. 一步一步搭建oracle 11gR2 rac+dg之共享磁盘设置(三)【转】

    一步一步在RHEL6.5+VMware Workstation 10上搭建 oracle 11gR2 rac + dg 之共享磁盘准备 (三) 注意:这一步是配置rac的过程中非常重要的一步,很多童鞋 ...

  9. 关于oracle数据库死锁的检查方法

    一.数据库死锁的现象程序在执行的过程中,点击确定或保存按钮,程序没有响应,也没有出现报错. 二.死锁的原理当对于数据库某个表的某一列做更新或删除等操作,执行完毕后该条语句不提交,另一条对于这一列数据做 ...

  10. mysql命令gruop by报错this is incompatible with sql_mode=only_full_group_by

    在mysql 工具 搜索或者插入数据时报下面错误: ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause ...