$result = $_SGLOBAL['db']->query("SELECT * FROM ".tname('config')." WHERE var in( 'index_section_1','index_section_2','index_section_3','index_section_4','index_section_5','index_section_6') LIMIT 0,3"); 还有在 $result = $_SGLOBAL['db']->query("SELECT * FROM ".tname('jobs')." WHERE jid =$result[i] LIMIT 0,6"); 具体怎么写
将我给你的代码 添加进去 把输出结果copy出来给我们瞧瞧
不行出现错误 了 Parse error: syntax error, unexpected $end in D:\AppServ\www\51wanglie\index.php on line 98 $result = $_SGLOBAL['db']->query("SELECT1 * FROM ".tname('config')." WHERE var in( 'index_section_1','index_section_2','index_section_3','index_section_4','index_section_5','index_section_6') ");
$Info=array(); while ($Result=$_SGLOBAL['db']->fetch_array($result)){ $Info[]=$Result; }foreach ($Info as $key=>$value){ print_r($value); }
while ($Result=$_SGLOBAL['db']->fetch_assoc()){
$Info[]=$Result;
}foreach ($Info as $key=>$value){
print_r($value);
}
var varchar(30) utf8_general_ci 否 Browse distinct values 更改 删除 主键 唯一 索引 全文搜索
datavalue text utf8_general_ci 否 Browse distinct values 更改 删除 主键 唯一 索引 全文搜索
var datavalue
index_section_1 1;2;3;4;
index_section_2 1;2;3;4;
index_section_3 1;2;3;4;
index_section_4 1;2;3;4;
index_section_5 1;2;3;4;
index_section_6 1;2;3;4;
还有在
$result = $_SGLOBAL['db']->query("SELECT * FROM ".tname('jobs')." WHERE jid =$result[i] LIMIT 0,6");
具体怎么写
Parse error: syntax error, unexpected $end in D:\AppServ\www\51wanglie\index.php on line 98 $result = $_SGLOBAL['db']->query("SELECT1 * FROM ".tname('config')." WHERE var in( 'index_section_1','index_section_2','index_section_3','index_section_4','index_section_5','index_section_6') ");
$Info=array();
while ($Result=$_SGLOBAL['db']->fetch_array($result)){
$Info[]=$Result;
}foreach ($Info as $key=>$value){
print_r($value);
}