/* =========================================================================================== * ========================================= NOTIFY ========================================== * =========================================================================================== */ /*------------------------------------- = notify_send($uids,$type,$title,$info,$cate) -------------------------------------*/ define("__APP__", "/TEST/TP1_6/Test/index.php"); $uid = "111,222"; $type = "mini_comment"; $title_data2["xxx"] = "aaa"; $body_data2["comment"] = "PLMM!"; $body_data2["url"] = __APP__ . "/Photo/list/id/2"; //$r = $api->notify_send($uid,$type,$title_data2,$body_data2); ts_dump($r); /*------------------------------------- = notify_get($cate,$type); -------------------------------------*/ $r = $api->notify_get("notification"); ts_dump($r); /*------------------------------------- = notify_getNewNum($cate); -------------------------------------*/ $r = $api->notify_getNewNum(null, "json"); ts_dump($r); /*------------------------------------- = App -------------------------------------*/ $r = $api->app_getLeftNav(); ts_dump($r);
/** * 执行一个SQL查询 * * 本函数仅限于执行SELECT类型的SQL语句 * * @param string $sql SQL查询语句 * @return resource 返回查询结果资源句柄 */ public function query($sql) { $this->sqls[] = $sql; $this->q_sqls[] = $sql; $this->sql = $sql; if (!$this->q_conn) { $this->connect("slave"); } $this->qrs = mysql_query($sql); if (!$this->qrs) { ts_dump($sql); throw new LW_DB_Exception('查询失败:' . mysql_error($this->q_conn)); } else { $this->query_num++; return $this->qrs; } }