w取最大db_id。

 if($row=null){
var_dump(123);
}
var_dump($row); if($rowb=array('ww','w123')){
var_dump(234);
}
var_dump($rowb); $rowc=null;
if($rowc=null){
var_dump(345);
}
var_dump($rowc);
  NULL
  int(234)
  array(2) {
  [0]=>
  string(2) "ww"
  [1]=>
  string(4) "w123"
  }
  NULL

Returns an associative array that corresponds to the fetched row or NULL if there are no more rows.

 id  wint    wchar
1 1001 1001www
2 1002 1002www
3 1003 1003www
4 1004 1004www
5 1005 1005www
6 1006 1006www
7 1007 1007www
8 1008 1008www
9 1009 1009www
10 1010 1010www
11 1011 1011www
12 1012 1012www
13 1013 1013www
14 1014 1014www
15 1015 1015www
16 1016 1016www
UPDATE w1 SET wint=id+1000;
UPDATE w1 SET wchar=CONCAT(wint,'www');
DELETE FROM w1 WHERE id>16;
 $sql = 'SELECT * FROM w1 ';
if ($result = mysqli_query($link, $sql)) {
while ($row = mysqli_fetch_assoc($result)) {
$w_id = $row['id'];
}
// mysqli_free_result($result);
}
var_dump($w_id);
var_dump($row);
var_dump($result);

string(2) "16" NULL object(mysqli_result)#3 (5) { ["current_field"]=> int(0) ["field_count"]=> int(3) ["lengths"]=> NULL ["num_rows"]=> int(16) ["type"]=> int(0) }

 $sql = 'SELECT * FROM w1 ';
if ($result = mysqli_query($link, $sql)) {
while ($row = mysqli_fetch_assoc($result)) {
$w_id = $row['id'];
}
mysqli_free_result($result);
}
var_dump($w_id);
var_dump($row);
var_dump($result);

string(2) "16" NULL
Warning: var_dump() [function.var-dump]: Couldn't fetch mysqli_result
Warning: var_dump() [function.var-dump]: Couldn't fetch mysqli_result
Warning: var_dump() [function.var-dump]: Property access is not allowed yet
Warning: var_dump() [function.var-dump]: Couldn't fetch mysqli_result
Warning: var_dump() [function.var-dump]: Property access is not allowed yet
object(mysqli_result)#3 (5) { ["current_field"]=> NULL ["field_count"]=> NULL ["lengths"]=> NULL ["num_rows"]=> NULL ["type"]=> NULL }

null array mysqli_fetch_assoc ( mysqli_result $result ) void mysqli_free_result ( mysqli_result $result )的更多相关文章

  1. A query was run and no Result Maps were found for the Mapped Statement 'user.insertUser!selectKey'. It's likely that neither a Result Type nor a Result Map was specified.

    使用mybatis时出现异常问题: 有如下的错误 Error querying database. Cause: org.apache.ibatis.executor.ExecutorExceptio ...

  2. request.getAttribute( "result");和request.setAttribute("result",username);

    request.setAttribute("result",username);在request对象中加入名为result的属性并附值为username,因为request对象是可 ...

  3. Tomcat报错:No result type specified for result named 'success'

    今天学Struts, tomcat报出了异常信息 Exception starting filter [struts2] Unable to load configuration.还有 No resu ...

  4. ExecutorException: A query was run and no Result Maps were found for the Mapped Statement ‘com.win.mall.dao.CartMapper.test’. It’s likely that neither a Result Type nor a Result Map was specified.

    ExecutorException: A query was run and no Result Maps were found for the Mapped Statement 'com.win.m ...

  5. 查询数据库时mapper报错:It's likely that neither a Result Type nor a Result Map was specified.

    因为mapper.xml里把resultType写成了parameterType

  6. 【java异常】It's likely that neither a Result Type nor a Result Map was specified

    错误原因:mybatis配置文件没有返回类型参数 resultType 解决办法:resultType= 添加

  7. 【myBatis】It's likely that neither a Result Type nor a Result Map was specified.

    因为mapper.xml里把resultType写成了parameterType

  8. php基础总结

    目录 PHP开发基础 运算符.表达式和流程控制语句 数组和字符串 函数 PHP与Web页面交互 PHP操作MySQL数据库 面向对象基础 期间看到的几篇有意思的博客 为什么 var_dump(&quo ...

  9. PHP 笔记——操作MySQL数据库

    1. 连接MySQL服务器 ​ mysqli_connect :此函数是该函数的别名: mysqli::__construct() mysqli mysqli_connect ( [string se ...

随机推荐

  1. python中unicode和unicodeescape

    在python中,unicode是内存编码集,一般我们将数据存储到文件时,需要将数据先编码为其他编码集,比如utf-8.gbk等. 读取数据的时候再通过同样的编码集进行解码即可. #python3 & ...

  2. Nginx 使用中文URL,中文目录路径

    Nginx 使用中文URL,中文目录路径 分类: linux2012-05-03 11:04 2672人阅读 评论(0) 收藏 举报 nginxurl服务器translationcentosserve ...

  3. iOS_文件上传进度条的实现思路-AFNettworking

    iOS_文件上传进度条的实现思路-AFNettworking //要上传的文件名,在这里我使用当前日期做为文件的名称 NSString * fileName =[NSString stringWith ...

  4. 简单集成高大上的ImagePicker无标题文章

    简单集成高大上的ImagePicker无标题文章   现在是个项目就要有图片上传所以下面介绍一下简单高端的图片选择器 感谢读者的细心发现bug,最近bug已经修复(github更新)所以对文章部分内容 ...

  5. NAT--Network Address Translator

    定义 Nat用于在本地网络中使用私有地址,在连接互联网时转而使用全局IP地址的技术.除了转换IP地址外,还出现了可以转换TCP.UDP端口号的NAPT(Network Address Ports Tr ...

  6. 0810 smarty

    1.Smarty简介(why,what) why:smarrty 将前端工程师和程序员的工作分开,让前端工程师完成前台页面的工作,程序员完成后台的业务逻辑.what模版引擎是用来将PHP代码和模版页组 ...

  7. ComBoFuzzySearch.js

    /** * combobox和combotree模糊查询 */(function () { //combobox可编辑,自定义模糊查询 $.fn.combobox.defaults.editable ...

  8. C#实例.net_经典例子400个

    一共470多例winform 界面特效的源码. 窗体与界面设计... 9 实例001  带历史信息的菜单    10 实例002  菜单动态合并    12 实例003  像开始菜单一样漂亮的菜单.. ...

  9. 【转】H5页面的测试点总结

    在此对H5页面的测试点(以及容易出问题的点)  1.业务逻辑相关  除基本的功能测试之外,H5页面的测试,需要关注以下几点:  1.1 登陆  目前H5与native各个客户端都做了互通,所以大家在测 ...

  10. 【基础练习】【BFS+A*】codevs1225八数码难题题解

    题目描写叙述 Description Yours和zero在研究A*启示式算法.拿到一道经典的A*问题,可是他们不会做,请你帮他们. 问题描写叙述 在3×3的棋盘上,摆有八个棋子,每一个棋子上标有1至 ...