You are here: Re: Need help getting a script for huge inserts « PHP Programming Language « IT news, forums, messages
Re: Need help getting a script for huge inserts

Posted by Freebird on 12/06/05 08:42

Tks a lot, you're right, in here is better, but there's a problem, I can
open the file, grab it all, and have all inside a array like this:

$info[0][0] = 'row 1';
$info[1][0] = 'row 2';
$info[2][0] = 'row 3';

But I've done a lot of tests, and can't get that running, how would I place
my array inside this code ?

Tks a lot for your help

Freebird

> function insert_rows ()
> {
> :: blah blah ::
> }
>
>
> # main code at end ..
>
> $arg_rerun = 'rerun'; # Rerun argument value
>
> $args = array ();
>
> if (array_key_exists ('argv', $_SERVER))
> {
> for ($i = count ($_SERVER['argv']); 0 < --$i; )
> {
> $arg = $_SERVER['argv'][$i];
>
> $args[$arg] = 1;
> }
> }
>
> if (! array_key_exists ($arg_rerun, $args))
> {
> $file = __FILE__; # Our absolute path
>
> if (PHP_OS == 'WINNT') # Windows
> {
> proc_close (proc_open ("start /b php $file $arg_rerun",
> array(), $foo));
> }
> else # Unix (e.g. PHP_OS ==
> 'Linux')
> {
> proc_close (proc_open ("php $file $arg_rerun &", array(),
> $foo));
> }
> }
> else
> {
> insert_rows ();
> }
>
> ?>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация