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. http_load使用详解

    1.什么是http_loadhttp_load是一款基于Linux平台的web服务器性能测试工具,用于测试web服务器的吞吐量与负载,web页面的性能. 2.http_load的安装1)下载地址wge ...

  2. hdoj 1272 小希的迷宫 又一个并查集的简单应用

    小希的迷宫 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submi ...

  3. Java得到GET和POST请求URL和参数列表

    一 获取URL:getRequestURL() 二 获取参数列表: 1.getQueryString() 只适用于GET,比如客户端发送http://localhost/testServlet?a=b ...

  4. 运用 Range 对象处理 Word 文档内容

    运用 Range 对象处理 Word 文档内容   在所有 Office 应用程序中,Microsoft Word 可能是应用最广泛的应用程序,它还经常在自定义 Office 解决方案中扮演重要的角色 ...

  5. 针对16v554(ttyS0-15)的ttyAT0的login配置

    1 ## /etc/inittab# console::sysinit:/etc/init.d/rcSconsole::respawn:/sbin/getty -L 115200 ttyAT0 vt1 ...

  6. ThinkPHP 汉字转成多种形式拼音

    模型: <?php namespace Admin\Model; use Think\Model; /** * 汉字转拼音 * @author huangguojin */ class ZHMo ...

  7. php 转码

    //$names = iconv("UTF-8", "gb2312", $name); //等同于javascript encodeURI("电影&q ...

  8. Ubuntu 16.04 更换阿里云源

    Ubuntu 16.04 更换阿里云源sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak #备份sudo gedit /etc/apt/so ...

  9. 编译内核出现"mkimage" command not found - U-Boot images will not be built

    参考链接: http://spyker729.blogspot.com/2010/07/mkimage-command-not-found-u-boot-images.html 制作uImage的工具 ...

  10. 输出JS代码中的变量内容

    一. 输出JS代码中的变量内容 1. 可以直接以提示框的形式输出 alert("输出的内容"); 2. 可以输出到网页的某个位置 a. 在显示输出的位置放一个标签 <a id ...