Mikael Andersson wrote:
> I've a case where I have to run a lots of php-scrips, in a short time,
> from
> inside a delphi-application. Every script connects to the same databas.
> Today I use CreateProcess to start php.exe and then I'm using pipes to get
> the php-result. I'm doing this for each php-script I want to run, and it's
> timeexpensive because every script has to establish a database-connection.

Perhaps you can use something that would essentially load in the
database-connecting script, and then each other script individually, one
after the other.

If all the scripts use _pconnect, then you'd probably see the performance
gain.

Another possibility is to use the Delphi application to choose *WHICH*
scripts to run, but call a single PHP script that:
connects to database
gets the list of scripts from Delphi (on command line or whatever)
runs each script

You'd need to modify something somewhere to get the results separated from
script to script, so I dunno if that's viable.

> I'm new in the PHP-world, but I'm sure that there is a better way to solve
> this case.
>
> I would prefer NOT to run php.exe all the time and of course I want to use
> the same databasconnectio, but I don't know how.
>
> It's not an option to put all the scripts into one big script.

I don't suppose not using Delphi at all is an option either? ... :-)

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to