GetOne? Sometimes PHPcodefunctionGetMaxLevel ($ model) {$ SQL = & quot; selectmax (slevel) fromboxfilewhere GetOne? Sometimes invalid
PHP code
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 ;}
Why does this function occasionally fail? I just returned the maximum value, but then I didn't return the maximum value. I felt that I didn't change anything ..
------ Solution --------------------
Are you sure you want to see the method of invalid and valid calls? is the parameter passed the same?
------ Solution --------------------
You encapsulated it yourself. in this case, it's hard to see the problem.
Let's take a look at the specific getOne statement. Is it a resource, an int, or another type?
------ Solution --------------------
Output your own sentence