I’m trying to create an appointment type select list when creating an appt but on the code i have below i’m getting the correct number of items in the select list but the value is ‘null’ for all of them. any help would be appreciated, thanks.
In the connector file below if I uncomment this line:
//$list->render_table("appttype","idkey","appttype(value),appttype(label)");
then it pulls the correct fields but I need to filter out the deleted types which is why i’m using the render_sql
html file:
[code]
connector file:
[code]<?php
require_once("…/codebase/connector/scheduler_connector.php");
$res=mysql_connect(“localhost”,"…","…");
mysql_select_db(“data00”);
$scheduler = new SchedulerConnector($res,“MySQL”);
$list = new OptionsConnector($res);
//$list->render_table(“appttype”,“idkey”,“appttype(value),appttype(label)”);
$list->render_sql(“select APPTTYPE, APPTCOLOR from appttype where APPTSTAT = ‘1’”, “IDKEY”,“APPTTYPE,APPTCOLOR”);
$scheduler->set_options(“type”, $list);
$scheduler->enable_log("…/scheduler/temp.log", true);
$scheduler->render_table(“events”,“event_id”,“start_date,end_date,details,event_type”);
?>[/code]