0
votes
0answers
42 views

Reading a file line by line for large files efficiently in PHP? [migrated]

My app reads a large file 5MB - 10MB that has been entered in with json entries line by line. Each line is handled by a parser that is fed to multiple parsers and treated separately. Once the file is ...
1
vote
2answers
142 views

Using replacement to get possible outcomes to then search through HUGE amount of data

I have a database table holding 40 million records (table A). Each record has a string a user can search for. I also have a table with a list of character replacements (table B) i.e. i = Y, I = 1 ...
0
votes
2answers
201 views

Using a parser to locate faulty code

Lately I've been working a lot in PHP and have run into an abnormally large number of parsing errors. I realize these are my own fault and a result of sloppy initial coding on my part, but it's ...
0
votes
3answers
391 views

Passing class names or objects?

I have a switch statement switch ( $id ) { case 'abc': return 'Animal'; case 'xyz': return 'Human'; //many more } I am returning ...
4
votes
3answers
2k views

URL Encryption vs. Encoding

At the moment non/semi sensitive information is sent from one page to another via GET on our web application. Such as user ID or page number requested etc. Sometimes slightly more sensitive ...
4
votes
7answers
5k views

What is the best way to INSERT a large dataset into a MySQL database (or any database in general)

As part of a PHP project, I have to insert a row into a MySQL database. I'm obviously used to doing this, but this required inserting into 90 columns in one query. The resulting query looks horrible ...
1
vote
2answers
307 views

Is it more efficient to query once for all settings, or query whenever a setting is needed?

For my blog script I have a usergroup and permission system set up. Each user is assigned to a usergroup and I have a long list of permission settings. Both are stored in a MySQL database. At the ...