Re: [PHP] CSV speed

2008-03-11 Thread Arvids Godjuks
I should say that running 7 quueries against 200MB table with ~600 000 rows for 4 seconds looks to me as if there was no indexes and very poor database design (i mean that CVS file is dumped into database incorrectly). Or you'r server is Pentium 100 :) P.S. Having myself a 1.5GB database with

Re: [PHP] Template system in PHP

2008-02-13 Thread Arvids Godjuks
About designers who don't know PHP. There are two kinds 1). They draw only. They usualy don't know even HTML - they just draw. 2). They know HTML and make templates. usualy these people have to know HTML and CSS very well. And I can't imagine how they can do that without knowing at least Smarty

Re: [PHP] utf-8 in $_POST

2008-01-08 Thread Arvids Godjuks
To author: You'r going the wrong way. Make your page utf-8, all text on it. Set utf-8 encoding and treat all incoming data as UTF-8. If some agent (definetly not some browser - they all know UTF-8) doesn't understand that (that could be some hacker writing it's own bot) - that's his problem. Then

Re: [PHP] PHP5 Speed Issues

2008-01-01 Thread Arvids Godjuks
Hi everyone! Generaly author of the first e-mail is right. Ofcource, crawling over the code and getting out of it a few milliseconds off doesn't make it worth, but you can learn what is good and what is bad and write your code correctly from the start. Why not to use foreach ($data as $value) if

Re: [PHP] Change case of HTML tags

2007-12-20 Thread Arvids Godjuks
In preg_replace case need's to be done like this: $s = preg_replace('/(\.*\)/Uem', 'strtolower($1)', $s);

[PHP] HTML parser (maybe even HTML to BBCode)

2007-12-20 Thread Arvids Godjuks
Hi! I'm looking for fast HTML parser, witch can give me a tree of tags with their attributes. Maybe some one know a good HTML to BBCode parser, because that's exactly what i need. tried looking Google, doesn't helped much, still need to make a HTML to BBCode parser myself.

Re: [PHP] HTML parser (maybe even HTML to BBCode)

2007-12-20 Thread Arvids Godjuks
, Arvids Godjuks [EMAIL PROTECTED] wrote: Hi! I'm looking for fast HTML parser, witch can give me a tree of tags with their attributes. Maybe some one know a good HTML to BBCode parser, because that's exactly what i need. tried looking Google, doesn't helped much, still need to make a HTML

Re: [PHP] my paging task with PHP does not work. It uses cookie.

2007-09-14 Thread Arvids Godjuks
Don't use SQL_CALC_FOUND ROWS on simple queries, when you have to run a simple query on one or two (with join) tables with a simple WHERE. Especialy if tables are big. I found out that single SELECT COUNT(id) FROM table is far more faster when query has simple WHERE conditions. I use