This topic is locked

before display event

12/9/2011 3:44:15 PM
PHPRunner General questions
S
stiven author

hello,
i have a question im not sure if it is possible. im trying to get a specific record on before display event but since i don't have a key column to get i'm not sure if there is a way to do it please any help would be greatly appreciate it. here is the code i have. thanks



global $conn;

$sql = "SELECT `viewing_date`, `start_time`, `end_time` FROM `viewing` WHERE `case_no` = '".$GetIdHere."'";// i need to get the id here from every record on the list page im not sure if it's possible?

$rs = db_query($sql,$conn);

$data = db_fetch_array($rs);
$msg = 'Viewing Date: '.$data['viewing_date'].' Start Time: '.$data['start_time'].' End Time: '.$data['end_time'];
$viewinginfo = $msg;

$xt->assign("viewinginfo",$viewinginfo);
S
stiven author 12/9/2011

Never mind, I found another way to do what i needed to do in the custom view..
thanks anyways.