本文整理汇总了PHP中DataConnector::configure方法的典型用法代码示例。如果您正苦于以下问题:PHP DataConnector::configure方法的具体用法?PHP DataConnector::configure怎么用?PHP DataConnector::configure使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataConnector
的用法示例。
在下文中一共展示了DataConnector::configure方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: insert_session
<?php
session_start();
require_once "../codebase/connector/scheduler_connector.php";
$res = mysql_connect("localhost", "root", "");
mysql_select_db("calendar");
// $conn = new SchedulerConnector($res);
$details = new DataConnector($res);
$details->configure("cus", "c_id", "c_id,c_fname");
$conn = new SchedulerConnector($res);
$conn->mix("cus", $details, array("c_id" => "c_id"));
// function my_update($data){
// $data->add_field("c_id",1);
// $data->set_value("c_id","10");
// //will be included in update processing
// }
// $conn->event->attach("beforeUpdate","my_update");
$conn->enable_log("temp.log");
$c_id = $_SESSION["login"];
$type = $_GET['type'];
$eid = $_GET['eid'];
// $conn->render_table("bookevent","event_id","start_date,end_date,event_name");
function insert_session($action)
{
$action->add_field("cid", $_SESSION["login"]);
$action->add_field("eid", $_GET["eid"]);
}
$conn->event->attach("beforeProcessing", "insert_session");
// $conn->event->attach("Select","select * from bookevent where c_id={c_id}");
// $conn->render_table("bookevent","event_id","start_date,end_date,event_name,cid");
// $conn->render_sql("select * from bookevent where c_id = ".$c_id." AND `start_date` >= '2015-07-08 00:00:00' AND `end_date` <= '2015-07-11 00:00:00' ","event_id","start_date,end_date,event_name,rec_type,event_pid,event_length,details,event_location,lat,lng");