[PHP] asking how to make plain text database searching system


 
Thread Tools Search this Thread
Top Forums Programming [PHP] asking how to make plain text database searching system
# 1  
Old 04-28-2010
[PHP] asking how to make plain text database searching system

hi, i want to ask, how to make a plain text database (u need to call and search all the data manually) in PHP. i am going to apply it in UNIX os. anyone have any idea how to do it? most of the data only using mysql while i am forbid to do so.
# 2  
Old 04-28-2010
A lot of unixes come with something like "db". db is an old text based database.
It does pretty much what a real database does, just using simple C routines.

The suggestion is: find something like that and then port it to php. Meanwhile look for another job where restrictions 'forbid to use xxx' do not exist. Unless this is homework.
# 3  
Old 04-28-2010
You could create a customer database for instance by using the unix directory structure as the index.
Code:
mkdir customers
cd customers
mkdir cust1 cust2 cust3 cust4
cd cust1
cat "customer name" >name
cat "customer city" >city
cat "phone" >phone
copy /tmp/picture.jpg custlogo.jpg
mkdir purchases
cd purchases
cat "part number " >invoice1

You can "seek" customer name by
Code:
cat customers/$cust/name

You cal select all customer names by
Code:
cat customers/*/name >>selectlist

This User Gave Thanks to jgt For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Plain text table to csv problems

I´m trying to input a plain text table and I want to output a csv file with semicolon field separator. I have some problems with the \r and the fields with more of one line.. Some gnu util to do this without problems or awk solution? I´m attaching the original plain table file and the needed... (2 Replies)
Discussion started by: faka
2 Replies

2. Shell Programming and Scripting

Sum numeric columns contained in a plain text file

Hi everyone, Here are the contents of a plain text file created by a SQL query: SUM(T.TRNQTY) COUNT(D.TRNSEQ) ---------------- ---------------- 1380 46 1393 59 2680 134 740 37 ... (5 Replies)
Discussion started by: gacanepa
5 Replies

3. Shell Programming and Scripting

Modify one line in a plain text file

Hi everyone, I want to know, if there is a way to modify one line in a text file with unix script, with out re-writing all the file. For example, i have this file: CONFIGURATION_1=XXXX CONFIGURATION_2=YYYY CONFIGURATION_3=ZZZZ supose i have a command or function "modify" that... (7 Replies)
Discussion started by: Xedrox
7 Replies

4. Shell Programming and Scripting

Display both html and plain text in email in shell script

Hi, I want to display both html and plain in email in my script. i tried the below code code: export MAILTO="ssi@a.com" export CONTENT1="$htmlfile" export CONTENT2="$plainfile" export SUBJECT="INFO " export MAILFROM="si@a.com" ( echo "Subject: $SUBJECT" echo "MIME-Version:... (4 Replies)
Discussion started by: sreelu
4 Replies

5. Shell Programming and Scripting

from one word for line to plain text

Hello! I've got a very big file (from tokenization) which has one word for line. How is it possible then to rebuild the "original" text, knowing that <s> and </s> are the sentence-delimiters? My file looks like this: <s> && tanzania na Afrika kwa ujumla ambiwa na taifa kubwa... (6 Replies)
Discussion started by: mjomba
6 Replies

6. Shell Programming and Scripting

Non-ASCII char prevents conversion of manpage to plain text

Hello, I would like to export manual pages to plain text files. man CommandName | col -bx > CommandName.txt The above statement works successfully on Mac OS X. However, it often fails on my old Linux. The problem occurs if the source file of the manpage contains an escape sequence for... (5 Replies)
Discussion started by: LessNux
5 Replies

7. Shell Programming and Scripting

delete " from plain text files

Hi, sorry for bothering with this easy problem but I can't understand... I've a file like this: "4","0x23a3" "5","0x4234" "11","" "20","" "11132","0x6456" I would like to create a file like this: 4,23a3 5,4234 11,999999 20,999999 11132,6456 I've tried: cat INPUT.txt | sed -e... (7 Replies)
Discussion started by: TheMrOrange
7 Replies

8. Linux

Plain Text printing issues

I'm attempting to print to a networked konica printer. No linux drivers that I know of exist, but we've always used HP 5si drivers and have had good results. We just loaded a box up with CentOS 5, and now when we print any sort of file from the command line (lp -dkonica <filename>), the text is... (0 Replies)
Discussion started by: fender177
0 Replies

9. AIX

email from root sent my passord in plain text.

Root emailed me this message and thats ok it is supposed to. The thing that concerns me is that the ADMIN password came in plain text. I Xed it out for the purpose of this message of course. Is there a way for me to set this so the password comes encrypted? OR is not included at all in the... (4 Replies)
Discussion started by: rocker40
4 Replies
Login or Register to Ask a Question