Hi, @Robin17, as you are not getting any data from Outer source, so you don’t need to query like this, just be simple
$current_user_id=$GLOBALS['current_user']->id;
$result=$GLOBALS['db']->query("SELECT * FROM cand_list WHERE created_by ='$current_user_id' AND deleted=0");
if ($result->num_rows > 0) {
while ($row= $GLOBALS['db']->fetchByAssoc($result)) {
//Complete Row
print_r($row);
//and then you can get the fields like id
$id=$row['id'];
}
}