Announcement

Collapse
No announcement yet.

How to Use mysql_field_name in Scriptcase 8.1 with SQL Macros?

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

  • How to Use mysql_field_name in Scriptcase 8.1 with SQL Macros?

    How to use mysql_field_name or How to get Table filed names.

    I want to display table field names using SQL macros which are in MySQL table

    In previous I used with mysql_field_name, So here with the Help of SC Macros I want to display Table field names.

    hence I don't find any macros in script case manual

    please suggest me of this kind.

  • #2
    answer is there ==> http://www.scriptcase.net/forum/show...9874#post39874

    Comment


    • #3
      Actually I want to display All Field names(Only Field Name not records form table)

      like

      <?php
      mysql_connect("localhost","root","");
      mysql_select_db("test");
      $sql=mysql_query("select * from album");//id,artist,title are field names in album table
      $fc=mysql_num_fields($sql);
      for($i=0;$i<$fc;$i++)
      {
      $fields=mysql_field_name($sql,$i);
      echo "$fields<br>";
      }
      /*
      out put
      id
      artist
      title
      */
      ?>


      here My output should be like this
      _________________
      | Id | artist | title |
      -----------------------

      not entire table (fields not values)

      Comment

      Working...
      X