本文整理汇总了PHP中DBConnect::quick_query方法的典型用法代码示例。如果您正苦于以下问题:PHP DBConnect::quick_query方法的具体用法?PHP DBConnect::quick_query怎么用?PHP DBConnect::quick_query使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DBConnect
的用法示例。
在下文中一共展示了DBConnect::quick_query方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: build_hierarchy
/**
*
* @param <type> $from_post_id
* @return array
*/
public function build_hierarchy($root_post_id = 0)
{
if (!is_numeric($root_post_id))
{
throw new DBForumException(
'$from_post_id must be numeric');
}
try
{
$result = array();
$all_posts = $this->db->quick_query(
"SELECT * FROM ".self::FCORE_FORUM_POST." WHERE
".self::FORUM_ID."=$this->forum_id
ORDER BY ".self::POSTORDER, true);
if ($all_posts == null)
{
return null;
}
return $this->to_flatten_array(
$this->find_includes($root_post_id, $all_posts));
}
catch(Exception $e)
{
throw new DBForumException($e->getMessage());
}
}
示例2: delete_all
/**
*
*/
public function delete_all()
{
try
{
$this->conn->quick_query(
"DELETE FROM ".$this->config_map[self::DB_TABLE_NAME]
);
$this->conn->commit();
}
catch(DBConnectException $e)
{
$this->conn->rollback();
FCore::GetLogger()->log(Logger::LEVEL_ERROR, $e->getMessage());
throw new DBFactoryException(
"An Error Occurred While Attempting To Delete: ", $e);
}
}