473,383 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

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!
http://www.lajzar.co.uk

Jul 17 '05 #1
3 1897
Fabian wrote:
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?


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:

http://www.c-worker.ch/txtdbapi/index_eng.php

Regards,
Erwin Moller
Jul 17 '05 #2
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.
Jul 17 '05 #3
Fabian wrote:
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?


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/

Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: LRW | last post by:
Because I've had recipients of our newsletter tell us they can't (or won't) receive HTML e-mail, I found out how to make an e-mail that sends both HTML and a plaintext version in a multipart...
7
by: news | last post by:
Before I begin, I realise there's a big war regarding HTML in e-mails. Personally, I don't like it. Unfortunately, I'm being paid by my company to create an automated newsletter for our customers....
5
by: Ajay Brar | last post by:
hi! I am getting an error - Crypto.PublicKey.RSA.error: Plaintext too large - when verifying the signature of a document. What i am doing is - the document and the signature are downloaded off...
3
by: gf gf | last post by:
Hans, Thanks for the tip. I took a look at Beatiful Soup, and it looked like it was a framework to parse HTML. I'm not really interetsed in going through it tag by tag - just to get it...
8
by: Dave Smithz | last post by:
Hi, Thanks to this group I discovered the excellent PHP Mailer (http://phpmailer.sourceforge.net/) which I use to send emails. Part of my application emails out hundreds of club members unique...
6
by: Joerg Battermann | last post by:
Hey there, mmmm does anyone know a library or anything I can use to convert plaintext to html real quick and vice-versa? Regex surely would do the trick to a certain level, but maybe there's...
1
by: simon | last post by:
I have an unbound RTF2 control in an Access 2003 form which I set to show either unformatted text or else text with words and sentences highlighted. I do this by setting the PlainText property,...
7
by: Luca Villa | last post by:
I have many html files named like these: c:\dir\femo-black.html c:\dir\loren-white.html c:\dir\spark-white.html c:\dir\kim-black.html c:\dir\paul-white.html How can I convert only the files...
2
by: cablepuff | last post by:
template <typename ContainerType> ContainerType rsa_encrypt_list(const std::string&, const typename ContainerType::reference, const typename ContainerType::reference); const BigInteger...
5
Tarantulus
by: Tarantulus | last post by:
Hi All, I have what I believe is a complex problem, but hopefully you'll be able to provide me with a simple answer. I'm using XMLHttpRequest() to call a PHP script (which I have no control...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.