Skip to content

Instantly share code, notes, and snippets.

@phpdever
Created May 9, 2017 09:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phpdever/6012c71724e78891bbc977fce66c6046 to your computer and use it in GitHub Desktop.
Save phpdever/6012c71724e78891bbc977fce66c6046 to your computer and use it in GitHub Desktop.
关于php循环读取数据表,并对其进行排序无效的问题
$result = json_decode($json,true);
foreach($result['result']['items'] as $key=>$val){
$where['id'] = array('eq',$val['id']);
$items = M('item')->where($where)->order('id asc')->select();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment