时间:2021-07-01 10:21:17 帮助过:22人阅读
require_once "ORM.php";
ORM::configure('mysql:host=localhost;dbname=mydemotest');
ORM::configure('username', 'root');
ORM::configure('password', '123456');
//初始化
ORM::configure('return_result_sets', true);
//
$account = ORM::for_table('account')->create();
$account->id = 11;
$account->account = 1236;
$account->save();
require_once 'ORM.php';
ORM::configure('mysql:host=w.rdc.sae.sina.com.cn:3307;dbname=SAE_MYSQL_DB');
ORM::configure('username', 'SAE_MYSQL_USER');
ORM::configure('password', 'SAE_MYSQL_PASS');
$account = ORM::for_table('account')->create();
$account->id = 11;
$account->account = 1236;
$account->save();
?>
ORM::configure('mysql:host=w.rdc.sae.sina.com.cn:3307;dbname=' . SAE_MYSQL_DB);
ORM::configure('username', SAE_MYSQL_USER);
ORM::configure('password', SAE_MYSQL_PASS);