PHP simple text database with SQL syntax [closed] - php

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I am looking for a simple text flat database that can work with the SQL-like instructions SELCT, INPUT, UPDATE, DELETE.
There is a database that fully satisfies me, but it is for Perl - http://metacpan.org/pod/Sprite
I need something like that, but PHP class.
Thank you in advance!

Use SQLite. It has a PHP class too here:
http://www.phpclasses.org/package/2107-PHP-SQLite-database-access-wrapper.html

Apparently stalled or abandoned but quite what you are looking for:
PHP Text File Database API - PHP Text DB: access Text Files with SQL
http://www.c-worker.ch/txtdbapi/index_eng.php, also at
http://sourceforge.net/projects/flatfiledb/
PHP Flatfile package - provides equivalents to many common SQL commands
http://lukeplant.me.uk/resources/flatfile/

is this what you're looking for? askSam

file = table
folder = database
http://nodb.at/
ASAP - as simple as possible
the idea is like this:
database = folder
table = subfolder
column = file in subfolder
record = a line in column-file ;)
so theoretically you could have a table inside a table or even work with filesystem links (linux ln -sv command)

Related

How to traverse html files and string replace matching results [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I have a website that's been set up rather poorly (2000+ page files that has code copy/pasted for header+footer sections instead of setting up includes() for external files.)
I was wondering if there was a way I could write some sort of script or macro or something that will go through each file, find a specific snippet that starts with (for example) and ends with , and just deletes that specific section of code.
I don't have any experience with writing macros or anything else like this so if there's a program that exists or an add-on in sublime or something like that, It would be amazing if someone could point me in that direction. Otherwise, how should I get started in creating something that can do this for me?
Thanks for your help! Please let me know if I can answer any questions to clarify this.
Sublime text 2 or Sublime text 3 supports regex.
They also have features where you can 'find & replace'
If the website is hosted on a linux server you can look into sed . It is extremely powerful and you can have it search recursively on a directory if you pair it with a find command.

MySQL : Monitor Queries [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I am trying to understand a PHP - MySQL project. The Project is quite complex so exploring it line by line is quite impossible.
What I want to do is, compare the instances of a MySQL database.
Say,
1) MySQL is up and running. This is instance number one of the database.
2) A user logs in from PHP front end, and then logs out.
3) This is instance number two of the database.
I need to see what changed between instance one and instance two, in a friendly way.
Any suggestions regarding open source tools or any other techniques?
You could use mysqldump to take a snapshot of the database, do your login/log out and then dump the database again and use a tool like diff or winmerge to compare the changes.
You could also turn on full query logging in mysql - this is just a single line to the config - http://dev.mysql.com/doc/refman/5.1/en/query-log.html

How to extract field value from PDF form in PHP [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
We are developing PHP & MySQL based application. We distribute a registration form in PDF format. After filling form, user will upload PDF form to our application to register. We want to extract registration data in PDF form from PHP and save these data to database.
Can someone point me PHP classes for extracting field value from PDF form?
An alternative could be using an external program like http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/ and so something like:
$ pdftk file.pdf dump_data_fields
and then process the output. However, this would involve a lot of parsing logic and output processing. Plus, if you cannot install binaries on your server, never mind. :)
It might be just simpler to do as hoppa mentioned.
Edit: This question might be a duplicate of The best pratice to parse PDF forms fields with PHP5 that question has an interesting comment!

How to Upload Excel File to Single MySQL Table? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I've seen lots of examples of bulk uploading CSV files to MySQL. However, I have the need to utilize an Excel file, and don't want to trouble the user with saving as CSV. Can anyone provide links to PHP routines they use that will read large Excel files, match the column names to database table columns and upload large (>5k records) efficiently?
Thanks much!
You'd need to use something like PHPExcel to read/parse the Excel files. As for mapping columns to tables, that depends entirely on if the user actually bothers to put column headers into the spreadsheet. If they don't, then you'll just have to guess and it'll undoubtedly NOT work out nicely.
Allowing arbitarirly formatted spreadsheets anywhere near a database makes me cry...

How can I validate CSS within a script? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Is there a library out there which will validate CSS?
The only tools I can find to do so are web sites. If one of these sites has an API, that would fit the bill, too.
I have a script that serves as a CSS compiler. It sets various variables according to settings for a theme, and generates and writes a CSS file. Before committing to writing the CSS file, I'd like to validate it to make sure there aren't any invalid entries.
PHP would be convenient, but Python, Perl, Ruby, Java, or anything executable from a shell would be fine.
Ideally, there's something out there that I can use as part of a sequence like:
$css_file=theme_compile('theme-name');
if(!validate_css($css_file)){
echo "css file contained invalid entry 'width:px'";//just an example, of course
}
else{
file_put_contents('/path/css_file',$css_file);
}
W3C has an API:
http://jigsaw.w3.org/css-validator/api.html
You can also download the validator and run it locally:
http://jigsaw.w3.org/css-validator/DOWNLOAD.html
You need to be able to run java from your script.
Python library:
http://cthedot.de/cssutils/
There is a pear package called Services_W3C_CSSValidator which does this.
You can download the PHP class directly from the github if you prefer.
Its very simple to use.
require_once 'Services/W3C/CSSValidator.php';
$v = new Services_W3C_CSSValidator();
$result = $v->validateFile('pear_manual.css'); // XML
It includes all features available at http://jigsaw.w3.org/css-validator

Categories