php与mysql的常规使用
<?php
header("Content-type:text/html;charset=GBK");
/*
通常,php网页中完成有关数据库的操作,首先,需要如下代码:
$link = mysql_connect(“数据库服务器地址”,”用户名”,”密码”); //连接数据库系统
mysql_query(“set names 网页文件编码名”); //设定“连接编码”;
也可以这样做:mysql_set_charset(“网页文件编码名”);
mysql_query(“use 数据库名”); //选定要使用的数据库
也可以这样做:mysql_select_db(“数据库名”);
*/
$link = mysql_connect("localhost","root","");
mysql_set_charset("gbk");
mysql_select_db("student");
//添加数据
// mysql_query("insert into stu1 value(null,'小刚',default,19)");
echo "<h2>-------mysql_error()-------</h2>";
/*
获取mysql执行失败时的错误信息。它通常应用与如下场合:
mysql_query语句,当执行成功时,会返回一个结果集,失败就会返回false
$result = mysql_query(“select / delete / update / insert / create / dropt ....所有sql语句”);
if( $result === false){
echo “语句执行失败,请参考提示信息:” . mysql_error();
}
else{
//这里是成功的情况,那就后续处理。。。
}
*/
//我们执行一个错误的query语句
$error = mysql_query("insert into stu2 value(null,'小刚',default,19)");
if($error===false){
echo "执行失败,失败参考:".mysql_error();
}else{
echo "执行成功";
}
echo "<h2>-------查询语句-------</h2>";
/*
执行有数据返回的语句:select, show tables, show databases, desc 表名(显示表结构);
此时,使用mysql_query()函数,返回的结果分为:
如果失败:返回的是false;
如果成功:返回的是“结果集”——“数据集”——就是一行一行数据,就是有字段的一个“表结构”。它需要我们进一步去“取出”数据,才能使用其中的数据,其基本模式为:
$result = mysql_query(“select ... “); //执行有返回数据的语句
while ( $rec = mysql_fetch_array( $result ) ){
//mysql_fetch_array()会取出该结果集中的“一行数据”,并取得该行数据后赋值给$rec;
//此$rec就是一个数组,其下标就是字段名;
//在此while循环中,mysql_fetch_array()会一次次(一行行)取出结果集中的所有数据;
然后,在这里就可以处理该数组$rec了:
} fetch的三种类型
1. mysql_fetch_assoc($result):得到的数组类似这样:
array(“id” => 1, “name” => “user1”, “age”=>18); 2. mysql_fetch_row($result):得到的数组类似这样:
array(0=> 1, 1=> “user1”, 2=>18); 3. mysql_fetch_array($result):得到的数组类似这样:
array(“id” => 1, “name” => “user1”, “age”=>18, 0=> 1, 1=> “user1”, 2=>18); */
$str = mysql_query("select * from stu1");
echo "<table border=1px>";
echo "<tr><td>id</td><td>名字</td><td>性别</td><td>年龄</td></tr>";
while ($arr = mysql_fetch_array($str)) {
echo "<tr>";
echo "<td>".$arr['id']."</td>";
echo "<td>".$arr['name']."</td>";
echo "<td>".$arr['sex']."</td>";
echo "<td>".$arr['age']."</td>";
echo "</tr>";
}
echo "</table>";
echo "<h2>-------通用的查询语句-------</h2>";
/*
扩展php中操作mysql数据的几个函数:
$n1 = mysql_num_rows(结果集); //获得该结果集的数据行数;
$n2 = mysql_num_fields(结果集); //获得该结果集的数据列数;
$name = mysql_field_name(结果集, $i ); //获得结果集的第i个字段的名字!i从0开始算起
*/
echo "<table border=1px>";
//可以根据输入的查询语句的不同来显示查询结果
$sql = "describe stu1";
$str2 = mysql_query($sql);
echo "<tr>";
for($i = 0;$i<mysql_num_fields($str2);$i++){
$name = mysql_field_name($str2, $i);
echo "<td>".$name."</td>";
}
echo "</tr>";
while ($arr = mysql_fetch_array($str2)) {
echo "<tr>";
for($i = 0;$i<mysql_num_fields($str2);$i++){
$name = mysql_field_name($str2, $i);
echo "<td>".$arr[$name]."</td>";
}
echo "</tr>";
}
echo "</table>";
?>
效果演示
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAd8AAAIpCAIAAABsQaWWAAAgAElEQVR4nO3dwXXjOhKFYQXUmTAAbzuU3jmKWTsU5zEbRzBrzkK2TBGoQhUAggXq/84779gUBRQh6gqGKPXtf//9D//xH//xH/9F+++2AgDiIZ0BICLSGQAiIp0BICLSGQAiIp0BICLSGQAiIp0BICLSGQAiIp0BICLSGQAiIp3xar4+3m6329vH17qu6+f77Xa7vX+eXRSQIJ3xUu7RvI3jp7AG4iCdL4kZYd59XJIkZrgQEel8IfeQ+UXcPBOyuXATcBLS+Yq+Y5p03tIHJV3xAE5GOl8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nv+dv+3P2a+qUm4o9HncsE5m38lmEHWHS+bu1dEu2CyVlLp/Oq/w9zmki69vtPfYS53z2mrfyWYQd4VnTuYJ3glxxl4sFdEU663FMOleYt/JZhB1h0pl0Fkl/taz9JsuWHruIcz57zVv5LMKOsC+di3/v7261LzgqsjM4aX0ze6u+9Ek6S1zpXDG8xh67CPsMLJq38lmEHWFHOlvWHC1rkV7S2EkvEt4CSGeJa+Slm1bPmwSkc2reymcRdoRrVjaUEDw9ne2/Wgojne8/NKZz8aZij+3CPgOL5q18FmFHuGZlY5X/sM1ubFzcIJ3PUj3ykuJupHNq3spnEXaEO69sPDXdKaqOTmflJtf2i0Xz2mPkvX8/kc6peSufRdgRrklnfZq83bjbp67E7ulsn/qRzvcfSOcTzVv5LMKOcP3KhuUZ2L6ska0ku2Ci/7qrP6Uvy1i2Vx9gWMbrdm4J6aa6HrsI+wwsmrfyWYQd4Zp3BfdNdJojt1fSqLryS0bzyvdsxDBv5bMIO8Id0nntNEfuUgk6Ip0jmLfyWYQd4T7pfKg4lbwa0jmCeSufRdgRJp0hIp0jmLfyWYQd4XI6L8vy72xxKnk140f+uB7nPYvmrXwW9xGeL50B4BWQzgAQ0TTp/Pfv3z8A8EpGhm/RNS/UBYDZkc4AEBHpDAARkc4AEBHpDAARkc4AEBHpDAARkc4AEBHpDAARkc4AEBHpDAARkc4AEBHpDAARkc4AEBHpDAARkc4AEBHpDAARkc4AEBHpDAARkc4AEBHpDAARkc4AEBHpDAARkc4AEBHpDAAR/R/KdwcFvaENpwAAAABJRU5ErkJggg==" alt="" />
php与mysql的常规使用的更多相关文章
- MySQL的常规操作
MySQL的常规知识 show 查看数据库 show databases; 查看表 存在的所有表 show tables; 创建表的命令 show create table table_name; 表 ...
- 【MySQL】MySQL的常规操作
MySQL的常规知识 标准的SQL语句通常可分为如下的几种类型: 1,DCL(Database Control Language) :数据控制语言,主要由grant和revoke关键字组成. 2.DD ...
- 数据库mysql的常规操作
1. 什么是数据库? 数据库(Database)是按照数据结构来组织.存储和管理数据的建立在计算机存储设备上的仓库. 简单来说是本身可视为电子化的文件柜——存储电子文件的处所,用户可以对文件中的数据进 ...
- 【MySQL】常规操作
2016.4.10 1.MySQL查看系统当前默认自增列种子值和步长值(全局) 1 show GLOBAL VARIABLES like 'auto_incre%'; 2.MySQL查看具体某一张表的 ...
- mysql数据库常规命令操作
1.MySQL数据库导出命令 1.导出整个数据库 mysqldump -u 用户名 -p 数据库名 > 导出的文件名 mysqldump -u wcnc -p smgp_apps_wcn ...
- mysql 原理 ~ 常规锁
一 模式 RR模式二 mysql锁相关场景 1 有间隙的地方就可能有间隙锁,并非只有辅助索引的场景下才会存在gap lock,典型场景 id主键的范围查询 2 varchar的范围锁定原理和int ...
- Mysql数据库常规操作(建表、查询)
一.表单操作 1-1.创建表 create table tb_name( id in primary key auto_increment); 1-2.查看表 desc table_name; ...
- MySQL 1045登录失败
当你登录MySQL数据库出现:Error 1045错误时(如下图),就表明你输入的用户名或密码错误被拒绝访问了,最简单的解决方法就是将MySQL数据库卸载然后重装,但这样的缺点就是就以前的数据库中的信 ...
- mysql:键缓存
myisam的主要优化参数: key_buffer_size - 这对MyISAM表来说非常重要,是用来设置整个MySQL中常规Key Cache的大小.一般来说,如果MySQL运行在32位平台,此值 ...
随机推荐
- [转载] 编程每一天(Write Code Every Day)
转载自:http://kb.cnblogs.com/page/536779/ 英文原文:Write Code Every Day 去年秋天,我的个人项目似乎走到了尽头:我一直没能取得必要的进展,在不牺 ...
- HDU 3783 ZOJ
ZOJ Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submiss ...
- MongoDB基础之九 replication复制集
准备工作:创建目录 mkdir -p /home/m17 //home/m18 /home/m19 /home/mlog 1:启动3个实例,且声明实例属于某复制集 # ./bin/mongod --d ...
- HDU 2520 我是菜鸟,我怕谁
我是菜鸟,我怕谁 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Su ...
- webapi 发布接口报405错误(angularjs2.0)
参考链接:http://www.cnblogs.com/shenbin/p/5680976.html web访问接口报405错误,以前的jQuery访问方式访问接口没有问题. 但是换成angularj ...
- jQuery UI 实例 - 自动完成(Autocomplete)
http://www.runoob.com/jqueryui/example-autocomplete.html 自定义数据并显示 您可以使用自定义数据格式,并通过简单地重载默认的聚焦和选择行为来显示 ...
- NoSql研究报告
NoSql研究报告 1.概述 随着互联网的不断发展,信息系统的数据变得越来越多,关系型数据库逐渐面临着难以克服的障碍,主要体现在: 对数据库的高并发读写需求 对海量数据的高效率存储和访问需求 对数据库 ...
- 【排序算法】归并排序算法 Java实现
归并排序是建立在归并操作上的一种有效的排序算法.该算法是采用分治法(Divide and Conquer)的一个非常典型的应用. 基本思想 可以将一组数组分成A,B两组 依次类推,当分出来的小组只有一 ...
- MINA、Netty、Twisted一起学(十一):SSL/TLS
什么是SSL/TLS 不使用SSL/TLS的网络通信,一般都是明文传输,网络传输内容在传输过程中很容易被窃听甚至篡改,非常不安全.SSL/TLS协议就是为了解决这些安全问题而设计的.SSL/TLS协议 ...
- Linux安装 Mysql
背景 前不久开始学习部署ambari,在安装mysql的时候遇到了点问题,现在从网上找了点部署流程记录下来便于以后安装mysql. Centos 7.2 安装 Mysql 5.7.13 首先要安装yu ...