PHP/mySQL getting .csv file exported

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jason Reljac

    PHP/mySQL getting .csv file exported

    Howdy,

    I'm looking for a little help.
    I had a W2K server with Apache/PHP/mySQL installed and working. I had
    a specific page that ran a mySQL SELECT INTO OUTFILE and dumped the
    outfile into a web accessible directory. Now mySQL has been moved to
    another server and my SELECT INTO OUTFILE no longer works.

    mySQL help tells me SELECT INTO OUTFILE only can create a file on the
    local system.
    I've tried mapping a directory with no luck.

    I looked into running a mysql -e command from the command line using
    php's exec() but I can't get the results into a .csv file like I need.

    So, can anyone help me with either getting the mysql -e to spit out to
    a comma seperated file or point me in another direction to get the
    file out of the DB into a .csv file on the webserver?

    I hope that made sense.

    J-
  • Pieter Nobels

    #2
    Re: PHP/mySQL getting .csv file exported

    Jason Reljac wrote:[color=blue]
    > I'm looking for a little help.
    > I had a W2K server with Apache/PHP/mySQL installed and working. I had
    > a specific page that ran a mySQL SELECT INTO OUTFILE and dumped the
    > outfile into a web accessible directory. Now mySQL has been moved to
    > another server and my SELECT INTO OUTFILE no longer works.
    >
    > mySQL help tells me SELECT INTO OUTFILE only can create a file on the
    > local system.[/color]

    Have you tried with the absolute path?

    --
    Pieter Nobels

    Comment

    • Jason Reljac

      #3
      Re: PHP/mySQL getting .csv file exported

      Yep, I tried that and it didn't like that either for some reason.
      I think it has something to do with mySQL...

      J-

      "Pieter Nobels" <pieterRE@MOVEp cmania.be> wrote in message
      news:WDpQc.2043 02$UO2.10287156 @phobos.telenet-ops.be...[color=blue]
      > Jason Reljac wrote:[color=green]
      > > I'm looking for a little help.
      > > I had a W2K server with Apache/PHP/mySQL installed and working. I had
      > > a specific page that ran a mySQL SELECT INTO OUTFILE and dumped the
      > > outfile into a web accessible directory. Now mySQL has been moved to
      > > another server and my SELECT INTO OUTFILE no longer works.
      > >
      > > mySQL help tells me SELECT INTO OUTFILE only can create a file on the
      > > local system.[/color]
      >
      > Have you tried with the absolute path?
      >
      > --
      > Pieter Nobels[/color]


      Comment

      Working...