#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    10
    Rep Power
    0
    I use PHP and MySQL. I am trying to find a solution where user can download results created in SELECT query.

    I thing the best solution is to write results of a query into a file with SELECT ... INTO OUTFILE -code and then make a link to that file. But my code doesn´t work right. I always get error message:

    Access denied for user: 'des-user@localhost' (Using password: YES)

    I have given to that user file-privileges in User -table of MySQL, but it doesn´t work.

    Q1: Is there any better solution to send data to user.

    Q2: If my way is the right way: How to make it work?

    I hope you can help me!

  2. #2
  3. No Profile Picture
    RyanP
    Guest
    Devshed Newbie (0 - 499 posts)
    why don't you just write the results to a text file using php's file i/o capabilities?
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    10
    Rep Power
    0
    How can I do that?
  6. #4
  7. No Profile Picture
    RyanP
    Guest
    Devshed Newbie (0 - 499 posts)
    open db

    query db

    open file

    write results to file

    close file

    close db

    ------------

    if this isn't enough, i'm sure that you can find plenty of examples of querying a db, getting results, and opening and writing to a file in this forum, or by using the php function reference at php.net

Similar Threads

  1. select verification onsubmit
    By DrStein in forum HTML Programming
    Replies: 3
    Last Post: January 20th, 2004, 04:16 AM
  2. select distinct problem
    By mrengc in forum MS SQL Development
    Replies: 1
    Last Post: December 23rd, 2003, 08:50 AM
  3. Problem with select into outfile
    By Mr Boo in forum MySQL Help
    Replies: 8
    Last Post: December 9th, 2003, 10:25 AM
  4. Help with javascript, passing multiple select array to js then php
    By zen^Wallhack! in forum JavaScript Development
    Replies: 1
    Last Post: December 3rd, 2003, 02:56 PM
  5. Help with function to copy contents of select item
    By MilesDependent in forum HTML Programming
    Replies: 2
    Last Post: November 23rd, 2003, 07:16 PM

IMN logo majestic logo threadwatch logo seochat tools logo