$output = '';
$sql = "SELECT * FROM my_table WHERE id = 310633997";
foreach ($xpdo->query($sql) as $row) {
$output .= $row['text123'];
}
return $output;
This question has been answered by sottwell. See the first response.