[PHP] rather a mysql question

2002-05-03 Thread Ando Saabas
Sorry that this is more of a mysql question, but since most php programmers use it a lot, i though i might find the answer without subscribing to mysql list, here goes: When i do a query from a big table using indexes,it takes for example 5 seconds. Now if i, after some time repeat the query, the

[PHP] regular expressions: HUGE speed differences

2002-04-06 Thread Ando
Im using a regular expression, to get all urls from a file. When using it on the webserver, it processes a 25kb html file about 0.25 seconds (PIII 350, 128mb ram, linux 2.2.13-7mdk, php 3.0.12). When i try the same on my machine (Celeron 300A, 192mb ram.), it does it about 14-17 seconds, which

[PHP] PHP stops execution without error message

2002-04-05 Thread Ando
Running php ver 3.0.12 and mysql ver 3.22.32 on a linux box. Php installed as apache module The script im running takes a long time to execute (20-40 minutes) and includes hundreds of selects and inserts into the database, and also opening/closing lots of files. And quite often, the script just

[PHP] ereg_replace or chr bug?

2002-03-28 Thread Ando
Ok, what i wanna do is replace the codes in html with ascii equivalents: $text= ereg_replace('#([0-9]+);' , chr('\1') , $text); But somehow it doesnt work, i have no idea why. When i use $text= ereg_replace('#([0-9]+);' , '\1' , $text); it replaces everything correctly But $text=

Re: [PHP] ereg_replace or chr bug?

2002-03-28 Thread Ando
the character specified by ascii. It replaces one (1) character, not a string -Original Message- From: Ando [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 28, 2002 6:59 AM To: [EMAIL PROTECTED] Subject: [PHP] ereg_replace or chr bug? Ok, what i wanna do is replace the codes

Re: [PHP] ereg_replace or chr bug?

2002-03-28 Thread Ando
, ereg_replace() fails and simply returns the original string, $text. -Original Message- From: Ando [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 28, 2002 7:08 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] ereg_replace or chr bug? Not sure what you mean here $text= ereg_replace('#([0

[PHP] regular expression for (NOT 'word')

2002-03-14 Thread Ando Saabas
how would i build a regular expression in php that would match everything but the given word. For example, match the string only if there isnt a word 'php' in the string. I understand i can list characters i dont want to see in the string: [^php]. but this means there cant be any p or h in the

Re: [PHP] regular expression for (NOT 'word')

2002-03-14 Thread Ando Saabas
everything that contains word script Rick Emery wrote: the best you can do is: ?php $a = this has php in the string; if( ! ereg(php, $a ) ) { print a: not in string; } $a = this has in the string; if( ! ereg(php, $a ) ) { print b: not in string; } ? -Original Message- From: Ando

[PHP] PHP output during longer program run times

2002-03-06 Thread Ando Saabas
Lets say i have a script that runs for a longer period of time, 1-10 minutes. Id like the script to give output as to what it is doing while it runs, but the problem is, that it wont print output on runtime, but it will output everything at the same time after it has completed the whole job.

[PHP] Extracting hyperlinks from file

2002-02-21 Thread Ando Saabas
of a way to make it walk through the whole string, so it would find all the links, not just the first one. Any ideas? Ando -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Extracting hyperlinks from file

2002-02-21 Thread Ando
of a way to make it walk through the whole string, so it would find all the links, not just the first one. Any ideas? Ando -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Extracting hyperlinks from file

2002-02-21 Thread Ando Saabas
of a way to make it walk through the whole string, so it would find all the links, not just the first one. Any ideas? Ando -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: sorry about multiple posts

2002-02-21 Thread Ando
Just that i sent the message about 15 hours ago, so i thought it didnt get through. Dunno why it took so long. And thanks for help Ando -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php