converting sql db to plaintext db

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

    converting sql db to plaintext db

    How can I convert a php script that uses an sql database so that it can
    use a simple text file (or multiple text files, but NOT sql) instead?


    --
    --
    Fabian
    Visit my website often and for long periods!


  • Erwin Moller

    #2
    Re: converting sql db to plaintext db

    Fabian wrote:
    [color=blue]
    > How can I convert a php script that uses an sql database so that it can
    > use a simple text file (or multiple text files, but NOT sql) instead?
    >
    >[/color]

    Not easy Fabian.

    You'll have to rewrite everything.

    I think you better consider using a flatfile-database system.
    Yes they exist.
    You can use SQL and the 'database' will be a PHP script that opens the
    tablefiles.

    This is a good one:



    Regards,
    Erwin Moller

    Comment

    • Erwin Moller

      #3
      Re: converting sql db to plaintext db

      Erwin Moller wrote:

      (From the manual for those who care)

      What is the "PHP-TextDB API" ?

      If you wanted to make a dynamic PHP-Website you've had two choices:

      1. You could save your data in a self-defined formatted text files. This has
      one big
      disadvantage: You would have none of the advantages a SQL database would
      provide,
      such as performing common SQL commands as SELECT, INSERT, and UPDATE, as
      well as filtering or ordering the result of queries. .

      2. You could host your website on a webserver that provides database
      software, but
      web hosting options on such a Server cost additional funds.

      That's where the "Txt-Db-API" could help.
      With the "Txt-Db-API" you can access normal Text Files like a SQL Database.
      You don't need any special database software on the webserver, yet you can
      still use SQL!
      You can use the API to create, query, change, delete, SQL tables, and you
      don't
      have to bother with the Text-Files themself; Almost everthing can be done
      with
      the supported API calls.The Txt-Db-API is object oriented and is very simple
      to use (IMHO :)).
      Disadvantages of the Txt-DB-API: It doesn't perform as well as a true
      production database system.

      Comment

      • R. Rajesh Jeba Anbiah

        #4
        Re: converting sql db to plaintext db

        Fabian wrote:[color=blue]
        > How can I convert a php script that uses an sql database so that it[/color]
        can[color=blue]
        > use a simple text file (or multiple text files, but NOT sql) instead?[/color]

        phpSt.Erwin already gave you the answer. But, FWIW, it is always
        better to go for wrapper classes for databases. I'd suggest phpBB like
        setup. In that case, it is easy to switch to other DB or to any flat
        file DB by just coding the wrapper.

        --
        <?php echo 'Just another PHP saint'; ?>
        Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

        Comment

        Working...