In discuz, why is it unable to be typed like this? at the end of this post, z2232855560 is used for editing from 2014-09-2700: 11: 42 and DB: Function. the code is as follows: & lt ;? Php ** & nbsp; * & nbsp; [Discuz!] & Nbsp; (C) 2001-20 in discuz, why can't this problem be solved?
This post was last edited by z2232855560 at 00:11:42
DB: Function. the code is as follows:
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: forum.php 33828 2013-08-20 02:29:32Z nemohou $
*/
define('APPTYPEID', 88);
define('CURSCRIPT', 'test');
require './source/class/class_core.php';
require './source/function/function_forum.php';
C::app()->init();
$squery=DB::query("SELECT catname FROM".DB::table('portal_category'));
while($value=DB::fetch($squery))
{
$data[]=$value;
}
print_r($data);
?>
Yes. I don't know why I am prompted that this field is not available, but it is clearly there.
------ Solution ----------------------
SELECT catname FROMportal_category
FROM and portal_category are stuck together.
$squery=DB::query("SELECT catname FROM ".DB::table('portal_category'));
------ Solution ----------------------
You are too careless. can you check it first...