in reply to Re: List columns for a MySQL table
in thread List columns for a MySQL table

that'd certainly work as well :)

it'll throw an error as is, though, you need a semicolon to end the SQL statement

apparently, my server is strangely configured or something, as this isnt the norm.

__________
Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
- Terry Pratchett

Replies are listed 'Best First'.
Re^3: List columns for a MySQL table
by jZed (Prior) on Jun 28, 2006 at 17:37 UTC
    Sorry, you're wrong. AFAIK, no DBI driver requires a semicolon at the end of a SQL statement and many will throw an error if you put one in (though DBD::mysql seems to allow, but not require it).

    update : To quote from the DBI docs: "Some command-line SQL tools use statement terminators, like a semicolon, to indicate the end of a statement. Such terminators should not normally be used with the DBI."

      despite what the DBI docs say, every query i run through DBD::mysql fails unless its terminated with a semicolon. mabye theres something strange about the server i'm on, though :shrug:

      edit: could be that i'm using mysql 5.0, which has some...oddities with DBD::mysql

      __________
      Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
      - Terry Pratchett