Home > Backend Development > PHP Tutorial > GetOne? 有时候失效解决方法

GetOne? 有时候失效解决方法

WBOY
Release: 2016-06-13 10:07:05
Original
1279 people have browsed it

GetOne? 有时候失效

PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->function GetMaxLevel($model)    {         $sql = "select max(slevel) from boxfile                 where model = '$model'";             $record_nums = $this->db->GetOne($sql);           //print_r($record_nums);        return $record_nums;         }
Copy after login

为什么我这个函数偶尔会失效呢 刚刚还只返回最大 后来就不返回最大了 我感觉我没改什么东西啊。。

------解决方案--------------------
那你有没有看失效和有效时调用的方式,参数传的是否一样呢

------解决方案--------------------
你值自己封装了的吧,这么看,很难看出问题
你要看看getOne的具体写法了,是返回了一个资源呢,还是一个int,还是其他的什么类型
------解决方案--------------------
自己拙句输出看看
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template