|
@@ -25,8 +25,18 @@ class TestController extends BaseController
|
|
|
$pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
|
|
|
|
|
|
// 成功连接
|
|
|
- $this->db = DB::setPdo($pdo); // 可选:将这个 pdo 绑定给 DB Facade 使用
|
|
|
- dd(11222333);
|
|
|
+ $db = DB::setPdo($pdo); // 可选:将这个 pdo 绑定给 DB Facade 使用
|
|
|
+ //检索条件 在库的
|
|
|
+ $result = $db->table('ST_SNState')
|
|
|
+ ->select('cinvCode as code','cInvSN as sn','AutoID as auto_id')
|
|
|
+ ->whereIn("cWhCode", [001,003])
|
|
|
+ ->where("cInvCode", "100000003")
|
|
|
+ ->where("iSNState", 2)
|
|
|
+ ->orderBy('cSNDefine1','desc')
|
|
|
+ ->orderBy('AutoID','asc')
|
|
|
+ ->get()->toArray();
|
|
|
+
|
|
|
+ dd($result);
|
|
|
|
|
|
// $db = DB::connection("mysql_001");
|
|
|
// $u8 = $db->table('sys_config')
|