Re: [PHP] Fast count of recordset in php...

2005-08-06 Thread TalkativeDoggy
if you just wana get count of recordset, don't do this: $sql = mysql_query("SELECT col FROM tbvara WHERE Varunamn LIKE '$checkLev%'"); // record count echo mysql_num_rows($sql); be coz this way is slow and costs more overload. $sql = "SELECT COUNT(IDVara) cn FROM tbvara WHERE Varunamn LIKE

[PHP] How efficient is OOP in PHP5?

2005-08-10 Thread TalkativeDoggy
Hi all, I have heard that "function style is 400% faster than OOP in PHP", and give a little agreement. So in the past year, I write more PHP code in function way while less in OOP way. This morning, I read an article called "How efficient is OOP in PHP" according to the author's test, writin

Re: [PHP] How efficient is OOP in PHP5?

2005-08-11 Thread TalkativeDoggy
this bit performance improvement. I need a well maintianed product. Jochem Maas wrote: TalkativeDoggy wrote: Hi all, I have heard that "function style is 400% faster than OOP in PHP", and give a little agreement. So in the past year, I write more PHP code in function way while les

Re: [PHP] How efficient is OOP in PHP5?

2005-08-11 Thread TalkativeDoggy
I can't agree any more! Maintainability is the most important, and if there is no readability or extensibility, there is no maintainability. So I recongnize what I should do now. Jochem Maas wrote: TalkativeDoggy wrote: Thanks for your help! That is just what I wana hear. Actuall

[PHP] Re: Regular expression question

2005-08-11 Thread TalkativeDoggy
How about using the lower() function? Leon Vismer wrote: Hi I would like to convert from one naming convention within a sql statement to another. I have the following, $str = "insert into userComment (userID, userName, userSurname) values (0, 'Leon', 'Vismer')"; $match = array( "/([a-z]