久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      yii框架如何通過表連接查詢數(shù)據(jù)

      yii框架如何通過表連接查詢數(shù)據(jù)

      首先創(chuàng)建數(shù)據(jù)庫與數(shù)據(jù)表,如下圖所示(部分截圖):

      數(shù)據(jù)庫:

      yii框架如何通過表連接查詢數(shù)據(jù)

      數(shù)據(jù)表:

      (相關(guān)教程推薦:yii框架)

      jf_stu:

      yii框架如何通過表連接查詢數(shù)據(jù)

      js_class:

      yii框架如何通過表連接查詢數(shù)據(jù)

      js_school:

      yii框架如何通過表連接查詢數(shù)據(jù)

      js_record:

      yii框架如何通過表連接查詢數(shù)據(jù)

      示例:

      //表連接,查詢出學(xué)生、班級、校區(qū)、記錄表的所有數(shù)據(jù) 		$data=Jf_record::find() 		->join('join','jf_stu','jf_record.sid=jf_stu.sid') 		->join('join','jf_class','jf_stu.cid=jf_class.cid') 		->join('join','jf_school','jf_class.xid=jf_school.xid') 		->select('*') 		->where(['jf_record.re_id'=>$re_id]) 		->asArray() 		->one(); 		echo $data['sname'].'<br>'; 		echo $data['sex'].'<br>'; 		echo $data['rtime'].'<br>'; 		echo $data['cname'].'<br>'; 		echo $data['school'].'<br>'; 		die;

      輸出結(jié)果:

      yii框架如何通過表連接查詢數(shù)據(jù)

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號