SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    always learning . . .
    Join Date
    Nov 2003
    Location
    UK
    Posts
    821
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    SQL QUERY: return field names. no data needed

    What is the query to return only field names and no data. Is there a proper way as at the moment I just give it an impossible argument that cant become true WHERE 1=2

    My complete idea which im after is to populate dynamically a select menu with the field names. column 5-8. It would be perfect if you can return only field names beginning with "dept_" then it shall pull the only ones i need and add the amount of values in the select option i need.

    Guys ?

  2. #2
    Non-Member
    Join Date
    Aug 2002
    Location
    USA
    Posts
    544
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you're using postgres, you can probably just query the system tables (pg_*). On mysql, you probably can do "show fields ..." or something, then parse the results.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •