php数据库简单语法._第1页
php数据库简单语法._第2页
免费预览已结束,剩余1页可下载查看

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、MYSQL 数据库ShowFiifsql? show ddtaba&es;! Databasei#-+t inft)rnAt ion_scheir) )A 1 mi/sqlidatabasesDropdatabaseCreatedatabase db_syca ndyUse db_syca ndyCreatetable 表名称Altertable tb_bookadd bookprice float; Show tabless ho bi tables:;:;- shou tables;! I ah les_in_dLb_sica.ri shou tables:i T ab les _

2、in_db_s5FcandyAlter table book drop sen dtimemysq 1 琶how tabLes:;:;I I ab les _in_dJ_sy candyDesc bookysql shou t ahl&s:;! Tables_in_d.b_sycandy !hookrow In set 5T5ql insert intv tb_s&i*usemftne,u$ei*pwdvaluesJ|, *12OK,. 1 row effected into t;uery OK. 1 rou offEITrun cate table tb_userSelect

3、 *from tb_userSelect *from tb_userlimit 0,2Select *from tb_userorder by id descSelect *from tb_userwhere age=3Select *from tb_userwhere age betwee n 20a nd 30Select *from tb_usergroup by gen dertiger , 123456 ; Set1Select coun t(*as total from tb_userSelect avg(ageas perce nt from tb_userSelect max(

4、ageas maxage from tb_userSelect min( ageasm in age from tb_userSelect *from tb userwhere user name liketj/sql? insert into !uer=20Select *from tb_userwhere user name liketigerandor age=20UpdateMysql_fetch_arraywhile($i nfo=mysql_fetch_array($result;mysql_free_result($result;mysql_close($c onn;?Mysql

5、_fetch_row$i nfo=mysql_fetch_row($result;doecho $mfo2 *while($infc = my s ql_fe tch_r o w ($r e suit)tinysql_free_result($resultLmy s ql_cl ofe($ conn);Mysql_fetch_object$i nfo=mysql_fetch_object($result;doecho $i nfo-userpwd.while($i nfo=mysql_fetch_object($result;mysql_free_result($result;mysql_close($c onn;Do.while(条件 循环数据库中的记录 Conn.php调用

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论