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. 线程相关函数(4)-pthread_mutex_lock(), pthread_mutex_unlock() 互斥锁

    互斥锁实例: #include <pthread.h>pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;int pthread_mutex ...

  2. Spring学习10-SpringMVC原理及核心组件1

    一.SpringMVC原理     请求到来时,第一个接受这个请求的前端控制器叫DispatcherServlet(这个需要在web.xml中配置), 后端控制器叫Controller.负责处理请求U ...

  3. :-1: error: [debug/moc_gotocelldialog.cpp] Error 2

    环境:Qt5.3 问题描述: 我将一个已经做好可以运行的小程序拷贝了一下,放在另一个目录下打开,却无法运行,提示上面的错误,而且原程序也无法运行了.不知道为什么,还没有答案...

  4. rsync 精确同步文件用法 (转载)

    -- include-from 指定目录下的部分目录的方法: include.txt: aa bb ss Command: rsync -aSz  --include-from=/home/inclu ...

  5. wpa wp2 psk的配置方式

    For WPA-PSK ctrl_interface=/var/run/wpa_supplicant ctrl_interface_group=0 eapol_version=1 fast_reaut ...

  6. PHP——0126最初

    数据库mydb 表格info,nation 实现效果 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN&quo ...

  7. oracle查询数据库最大连接数等信息

    .当前的数据库连接数 select count(*) from v$process where program='ORACLE.EXE(SHAD)'; .数据库允许的最大连接数 select valu ...

  8. C++ 运算符重载二(一元运算符重载)

    //一元运算符重载 #include<iostream> using namespace std; class Point { public: Point(int x,int y){ th ...

  9. C++ 百炼成钢20

    题目56: 编写C++程序完成以下功能:(1)定义一个Point类,其属性包括点的坐标,提供计算两点之间距离的方法:(2)定义一个圆形类,其属性包括圆心和半径:(3)创建两个圆形对象,提示用户输入圆心 ...

  10. JS侦测设备旋转方向

    window.onload = window.onresize = function initialLoad(){updateOrientation();} function updateOrient ...