need help writing database entires to file

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default need help writing database entires to file

    I have used dreamweaver to do a lot of php "programming" but now I need to
    write a real php function.

    I have a hosted mysql database that I need to export to MS Access. I can't
    use myODBC to do it because hosting company denies access to db port. I
    looked at other ways to dump the data but the escaped characters always
    threw the import off. There probably a way to do using MySQLDUMP command.
    HOwever, I remember a long time ago I wrote some code to read raw data into
    lotus notes and figured there is probably a way to write out the data using
    whatever field & record terminators I choose.

    Keeping in mind the end goal is to write on e that is friendly to import
    into MS Access, does anyone have an idea of how to use PHP to write a mysql
    db out to a *.txt file formatted for easy import to MS Access?

    If not, does anyone know how to write a mysql db out to a file?

    Many thanks!


    NotGiven Guest

  2. Similar Questions and Discussions

    1. Writing to a Database using Flash
      Hi, I am creating e-learning material that will be accessed online by students. Is there anyway that Flash can write to a database to tell us how...
    2. Writing to Oracle Database using Flex
      Hello gurus, I have created a Flex form application in Flex 1.5 This form application has several text input controls. The logic is, whatever...
    3. Writing into the database on the internet
      Hi! I have an application that runs on the internet that works with asp and access. When I request info from the database, it works fine, but when I...
    4. BLOB from database to Browser with out writing it out to a file.
      I would like to be able to extract a BLOB from the database (Informix) and pass it to a browser without writing it to a file. (The BLOB's are word...
    5. one to many relation writing to Access database
      In article <EYcMa.517516$122.49025169@amsnews02.chello.com>, marco@alting-multimedia.nl says... It sounds like what you want is really a many to...
  3. #2

    Default Re: need help writing database entires to file


    "NotGiven" <noname@nonegiven.net> wrote in message
    news:vI%jb.11129$h47.6101@bignews4.bellsouth.net.. .
    > I have used dreamweaver to do a lot of php "programming" but now I need to
    > write a real php function.
    >
    > I have a hosted mysql database that I need to export to MS Access. I
    can't
    > use myODBC to do it because hosting company denies access to db port. I
    > looked at other ways to dump the data but the escaped characters always
    > threw the import off. There probably a way to do using MySQLDUMP command.
    > HOwever, I remember a long time ago I wrote some code to read raw data
    into
    > lotus notes and figured there is probably a way to write out the data
    using
    > whatever field & record terminators I choose.
    >
    > Keeping in mind the end goal is to write on e that is friendly to import
    > into MS Access, does anyone have an idea of how to use PHP to write a
    mysql
    > db out to a *.txt file formatted for easy import to MS Access?
    >
    > If not, does anyone know how to write a mysql db out to a file?
    >
    > Many thanks!
    >

    You can create custom deliniated text files with mysql with


    SELECT INTO OUTFILE '/path/to/file/to/create.txt'
    FIELDS
    TERMINATED BY '\t'
    ENCLOSED BY ''
    ESCAPED by '\\'
    LINES
    STARTING BY ''
    TERMINATED BY '\n'
    FROM ....(where, group by, having, etc)


    The values given are the defaults if you don't specify them. Make sure MySQL
    has write permissions on '/path/to/file/to/'.


    Phlarmf Guest

  4. #3

    Default Re: need help writing database entires to file

    Many thanks. I'll give it a try!

    "Phlarmf" <no@email.com> wrote in message
    news:p4ekb.122291$pl3.46313@pd7tw3no...
    >
    > "NotGiven" <noname@nonegiven.net> wrote in message
    > news:vI%jb.11129$h47.6101@bignews4.bellsouth.net.. .
    > > I have used dreamweaver to do a lot of php "programming" but now I need
    to
    > > write a real php function.
    > >
    > > I have a hosted mysql database that I need to export to MS Access. I
    > can't
    > > use myODBC to do it because hosting company denies access to db port. I
    > > looked at other ways to dump the data but the escaped characters always
    > > threw the import off. There probably a way to do using MySQLDUMP
    command.
    > > HOwever, I remember a long time ago I wrote some code to read raw data
    > into
    > > lotus notes and figured there is probably a way to write out the data
    > using
    > > whatever field & record terminators I choose.
    > >
    > > Keeping in mind the end goal is to write on e that is friendly to import
    > > into MS Access, does anyone have an idea of how to use PHP to write a
    > mysql
    > > db out to a *.txt file formatted for easy import to MS Access?
    > >
    > > If not, does anyone know how to write a mysql db out to a file?
    > >
    > > Many thanks!
    > >
    >
    >
    > You can create custom deliniated text files with mysql with
    >
    >
    > SELECT INTO OUTFILE '/path/to/file/to/create.txt'
    > FIELDS
    > TERMINATED BY '\t'
    > ENCLOSED BY ''
    > ESCAPED by '\\'
    > LINES
    > STARTING BY ''
    > TERMINATED BY '\n'
    > FROM ....(where, group by, having, etc)
    >
    >
    > The values given are the defaults if you don't specify them. Make sure
    MySQL
    > has write permissions on '/path/to/file/to/'.
    >
    >

    NotGiven Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139