请帮我设置所需的数据库!谢谢!
<?php
require_once("adodb5/adodb.inc.php");
$web = NewAdoConnection("mysqlt");
$server = "*";
$user = "*";
$password = "*";
$database = "web";
$web->Connect($server, $user, $password, $database);
$modul = NewAdoConnection("mysqlt");
$server = "*";
$user = "*";
$password = "*";
$database = "modul";
$modul->Connect($server, $user, $password, $database);
$rs = $web->execute("SELECT DATABASE()");
echo $rs->fields[0]; // EXPECTED: "web", ACTUAL: "modul"
?>
答案 0 :(得分:0)
不确定,但我认为您正在寻找__construct
功能。
修改强>:
抓一点,我现在更好地理解你的问题。看起来您需要使用ADOdb_Active_Record。具体来说,请查看第17部分。This page也可能有所帮助。