retrieve value using select statement

Hi,

​I have a table with 2 fields:
“code” with value “2”
​"name" with value “abc”

​in the blank application, I just want to echo out the name value.

I put the following code and it will display “name abc”, I only want to display the value “abc”, how should I do the echo? Thanks.

sc_select(dataset, “select name from table1 where code = ‘2’”);
echo {dataset};

Try set: echo $dataset->fields[1];

Or try too: echo $dataset->fields[‘name’];