摘要:
prepare() 和 query().$sql=$db->prepare('select * from users where user_id= ? ');大家应该发现了 我们在sql语句中给出了一个变量用替代符 ? 表示,这就意味着我只要变化这个变量就可以重复使用同一句查询语句了$sql->ex... 阅读全文
摘要:
第一种require_once'Zend/Db.php';$db=Zend_Db::factory('Mysqli', array=( 'host'=>'localhost', 'dbname'=>'test' 'username'=... 阅读全文
摘要:
第一种:$conn['host'] = '127.0.0.1';$conn['username'] = '56_' . $tenant['tenant'];$conn['password'] = $tenant['password'];$conn['dbname'] = '56_' . $tenan... 阅读全文
摘要:
在model方法中 public function getCarrierstransportData($where){ $sql = " select ct.*,cs.name as carriername from carrierstransport ct,carriers cs ... 阅读全文