Announcement

Collapse
No announcement yet.

retrieve value using select statement

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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};

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

    Comment


    • #3
      Or try too: echo $dataset->fields['name'];

      Comment

      Working...
      X