数据库连接问题
文件1
$search_db = new SearchDo();
if ($search_db->connect() === false) { //数据库连接
exit;
}
if( $area_kubun_id == '') {
//地域
$list_area = new AreaList();
$area_list = $list_area->createList();
$smarty->assign('area_list', $area_list);
}else {
$area_list =$search_db->getAreaById($area_kubun_id);
$smarty->assign('area_list', $area_list);
}
文件2
class AreaList extends SelectList {
function AreaList(){
$sql = SQL_AREA_LIST_SELECT;
$this->sql = $sql;
$this->SelectList();
}
}
文件3
class SelectList extends BoatDb {
function SelectList() {
$this->BoatDb();
$this->connect(); // 数据库连接
}
function createList() {
--数据库操作--
$this->close();// 关闭连接
}
}
有 is not a valid PostgreSQL link resource 这个错误。
...全文
相关推荐
解决Java 连接MySQL数据库的出现的问题
完整解决Java MySQL连接的方法,步骤清晰简明,立即解决
C#连接Informix数据库的问题
主要介绍了C#连接Informix数据库的问题,本文给大家介绍的非常详细,对大家的工作或学习具有一定的参考借鉴价值,需要的朋友可以参考下
解决Django连接db遇到的问题
1、django.db.utils.ConnectionDoesNotExist: The connection default doesn’t exist 解决:第一个连接的命名一定要是default,将EN5Test改为default即可 2、django.core.exceptions.ImproperlyConfigured Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODUL
PB9.0升级到11.5 后数据库连接问题
由于pb9.0对webservice支持不好,因此将程序升级到pb11.5下面是本人在升级过程中的一些体会,希望对大家有用
dr中数据库连接问题
解决dreameaver中数据库连接中字符串定义连接问题。。。。03版和10版office的不同


基础编程

