本文整理汇总了PHP中get_list函数的典型用法代码示例。如果您正苦于以下问题:PHP get_list函数的具体用法?PHP get_list怎么用?PHP get_list使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_list函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_course_types
function get_course_types()
{
$query = 'SELECT course_type_cde, course_type_desc, sort_order
from course_type
order by sort_order';
return get_list($query);
}
示例2: latest
function latest($skin_dir = "", $bo_table, $rows = 10, $subject_len = 40, $options = "")
{
global $g4;
if ($skin_dir) {
$GLOBALS['latest_skin_path'] = $latest_skin_path = "{$g4['path']}/skin/latest/{$skin_dir}";
} else {
$GLOBALS['latest_skin_path'] = $latest_skin_path = "{$g4['path']}/skin/latest/basic";
}
$list = array();
$sql = " select * from {$g4['board_table']} where bo_table = '{$bo_table}'";
$board = sql_fetch($sql);
$tmp_write_table = $g4['write_prefix'] . $bo_table;
// 게시판 테이블 전체이름
$sql = " select * from {$tmp_write_table} where wr_is_comment = 0 order by wr_num limit 0, {$rows} ";
//explain($sql);
$result = sql_query($sql);
for ($i = 0; $row = sql_fetch_array($result); $i++) {
$list[$i] = get_list($row, $board, $latest_skin_path, $subject_len);
}
ob_start();
include "{$latest_skin_path}/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();
return $content;
}
示例3: get_signup_dates
function get_signup_dates()
{
$query = 'SELECT grade_lvl, mode_desc, signup_dates_mode.mode_cde, start, end
FROM signup_dates, signup_dates_mode
WHERE signup_dates.mode_cde = signup_dates_mode.mode_cde and grade_lvl != 13';
return get_list($query);
}
示例4: __construct
function __construct($coach_id)
{
// MySQL stored information
$this->coach_id = $coach_id;
$this->setStats(false, false, false);
$this->ring = (int) $this->ring;
if (empty($this->mail)) {
$this->mail = '';
}
# Re-define as empty string, and not numeric zero.
if (empty($this->phone)) {
$this->phone = '';
}
# Re-define as empty string, and not numeric zero.
if (empty($this->realname)) {
$this->realname = '';
}
# Re-define as empty string, and not numeric zero.
// Coach's site settings.
$this->settings = array();
// Is overwriten to type = string when loading MySQL data into this object.
foreach (get_list('coaches', 'coach_id', $this->coach_id, 'settings') as $set) {
list($key, $val) = explode('=', $set);
$this->settings[$key] = $val;
}
global $settings;
$init = array('theme' => 1, 'lang' => Translations::fallback, 'home_lid' => null);
// Setting values which must be initialized if not stored/saved in mysql.
foreach ($init as $key => $val) {
if (!array_key_exists($key, $this->settings) || !isset($this->settings[$key])) {
$this->settings[$key] = $val;
}
}
}
示例5: get_session_times
function get_session_times()
{
$query = 'SELECT ses_id, ses_name, ses_start, ses_end
from session_times
order by sort_order';
return get_list($query);
}
示例6: get_room_list
function get_room_list()
{
$query = 'SELECT rm_nbr, rm_id
from room
order by rm_nbr';
return get_list($query);
}
示例7: get_rooms
function get_rooms()
{
$query = 'select distinct rm_nbr, p.rm_id
from presentation p, room r
where p.rm_id = r.rm_id
order by r.rm_nbr;';
return get_list($query);
}
示例8: get_teacher_list
function get_teacher_list()
{
$query = 'SELECT teacher_id, last_name, first_name, display_name
from teacher
where active = 1
order by last_name, first_name';
return get_list($query);
}
示例9: get_user_list
function get_user_list()
{
$query = 'SELECT usr_id, usr_bca_id, usr_type_cde, usr_class_year, usr_grade_lvl,
usr_first_name, usr_last_name, usr_active
from user
where usr_active = 1
order by usr_grade_lvl desc, usr_last_name, usr_first_name ';
return get_list($query);
}
示例10: get_mentors
function get_mentors()
{
$query = 'SELECT mentor.mentor_id, mentor_last_name , mentor_first_name , mentor_field ,
mentor_position , mentor_company , mentor_profile , mentor_keywords ,
active , pres_room , pres_host_teacher ,
pres_max_capacity
from mentor
order by mentor.mentor_last_name';
return get_list($query);
}
示例11: get_signup_dates_list
function get_signup_dates_list()
{
$query = 'SELECT signup_dates.class_year, class_year, start, end,
GET_SCHEDULE_TIMES_LIST (signup_dates.class_year) as times
from signup_dates
inner join course_type
on course.course_type_cde = course_type.course_type_cde
inner join teacher
on course.teacher_id = teacher.teacher_id
where course.active = 1
order by course.course_nbr';
return get_list($query);
}
示例12: get_mentor_list
function get_mentor_list()
{
$query = 'SELECT mentor.mentor_id, mentor_last_name, mentor_first_name, mentor_field,
mentor_position, mentor_company, mentor_profile, mentor_keywords,
active, pres_room, pres_host_teacher, pres_max_capacity,
GROUP_CONCAT(ses_id order by ses_id SEPARATOR \', \') as sessions
from mentor
left join presentation on mentor.mentor_id = presentation.mentor_id
where active = 1
group by mentor.mentor_id
order by mentor_last_name';
return get_list($query);
}
示例13: get_presentation_list
function get_presentation_list()
{
$query = 'SELECT workshop.wkshp_nme, presentation.pres_id, presentation.org_name, presentation.rm_id,
pres_max_teachers, pres_max_seats, pres_enrolled_teachers, pres_enrolled_seats,
pres_max_seats - presentation.pres_enrolled_seats as remaining,
presenter_names, rm_nbr, ses_start_time, ses_end_time, presentation.ses_id, presentation.wkshp_id
FROM presentation, room, session_times, workshop
WHERE presentation.rm_id = room.rm_id
and presentation.ses_id = session_times.ses_id
and presentation.wkshp_id = workshop.wkshp_id
order by rm_nbr, presentation.ses_id ';
return get_list($query);
}
示例14: get_course_list
function get_course_list()
{
$query = 'SELECT course.course_id, course_name, course_nbr, course_short_name,
course_desc, course_type_desc, teacher.display_name,
course.course_nbr,
GET_SCHEDULE_TIMES_LIST (course.course_id) as times
from course
inner join course_type
on course.course_type_cde = course_type.course_type_cde
inner join teacher
on course.teacher_id = teacher.teacher_id
where course.active = 1
order by course.course_nbr';
return get_list($query);
}
示例15: getWriteTable
function getWriteTable($bo_table, $boardTableRow)
{
global $currentPageNo, $rowsPerPage, $write_prefix;
$board = $boardTableRow[0];
$subject_len = 40;
$startPage = ($currentPageNo - 1) * $rowsPerPage;
$endPage = $rowsPerPage;
$tmp_write_table = $write_prefix . $bo_table;
// 게시판 테이블 전체이름
$sql = " select * from {$tmp_write_table} where wr_is_comment = 0 order by wr_num LIMIT {$startPage}, {$endPage} ";
$result = sql_query($sql);
$resultArray = array();
for ($i = 0; $row = sql_fetch_array($result); $i++) {
$resultArray[$row['wr_id']] = get_list($row, $board, '', $subject_len);
}
if (count($resultArray) == 0) {
$resultArray["status_msg"] = "list no length";
$resultArray["status_code"] = "-2";
} else {
$resultArray["status_msg"] = "success";
$resultArray["status_code"] = "0";
}
return $resultArray;
}