PJ
|
| Posted: 04/01/2002, 3:05 AM |
|
Can anyone point me in the right direction for advice or an example of a
user being able to upload text based data to add to a MySQL table using PHP
in CodaCharge? I have a situation where a user wishes to add up to 100
records per day to a database which could be handled easier by uploading
from his PC as a text file.
thanks
PJ
|
|
|
 |
Alexey Alexapolsky
|
| Posted: 04/01/2002, 3:20 AM |
|
Do you want to split text file on server side into small pieces that will go
into different records ? or the whole file should go into 1 record ?
--
Alex
CodeCharge Developer
"PJ" <apis@globalnet.co.uk> wrote in message
news:a89eti$hba$1@news.codecharge.com...
> Can anyone point me in the right direction for advice or an example of a
> user being able to upload text based data to add to a MySQL table using
PHP
> in CodaCharge? I have a situation where a user wishes to add up to 100
> records per day to a database which could be handled easier by uploading
> from his PC as a text file.
>
> thanks
>
> PJ
>
>
|
|
|
 |
PJ
|
| Posted: 04/01/2002, 3:35 AM |
|
Hi Alexey
I want to split the text file (comma separated or whatever is easier) across
several records in one table much the same as importing data in to a desktop
application (eg Excel or Access)
PJ
"Alexey Alexapolsky" <alexa@codecharge.com> wrote in message
news:a89fpa$imf$2@news.codecharge.com...
> Do you want to split text file on server side into small pieces that will
go
> into different records ? or the whole file should go into 1 record ?
>
> --
> Alex
> CodeCharge Developer
>
>
> "PJ" <apis@globalnet.co.uk> wrote in message
>news:a89eti$hba$1@news.codecharge.com...
> > Can anyone point me in the right direction for advice or an example of a
> > user being able to upload text based data to add to a MySQL table using
> PHP
> > in CodaCharge? I have a situation where a user wishes to add up to 100
> > records per day to a database which could be handled easier by uploading
> > from his PC as a text file.
> >
> > thanks
> >
> > PJ
> >
> >
>
>
|
|
|
 |
PJ
|
| Posted: 04/01/2002, 3:39 AM |
|
Sorry that should have read "...across several fields in one table much the
same as importing .........."
PJ
"PJ" <apis@globalnet.co.uk> wrote in message
news:a89glg$k69$1@news.codecharge.com...
> Hi Alexey
>
> I want to split the text file (comma separated or whatever is easier)
across
> several records in one table much the same as importing data in to a
desktop
> application (eg Excel or Access)
>
> PJ
>
>
> "Alexey Alexapolsky" <alexa@codecharge.com> wrote in message
>news:a89fpa$imf$2@news.codecharge.com...
> > Do you want to split text file on server side into small pieces that
will
> go
> > into different records ? or the whole file should go into 1 record ?
> >
> > --
> > Alex
> > CodeCharge Developer
> >
> >
> > "PJ" <apis@globalnet.co.uk> wrote in message
> >news:a89eti$hba$1@news.codecharge.com...
> > > Can anyone point me in the right direction for advice or an example of
a
> > > user being able to upload text based data to add to a MySQL table
using
> > PHP
> > > in CodaCharge? I have a situation where a user wishes to add up to
100
> > > records per day to a database which could be handled easier by
uploading
> > > from his PC as a text file.
> > >
> > > thanks
> > >
> > > PJ
> > >
> > >
> >
> >
>
>
|
|
|
 |
Alexey Alexapolsky
|
| Posted: 04/02/2002, 3:11 AM |
|
Well , it's like this,
after upload your file stored in a temporary file,
you should parse it , get necessary chuchks of data,
and stuff them into database. It's not a CC task , it's pure coding in
Page/Open event.
a sketch is below :
$content = file($myfile_name);
$myarray = $parse($content);
$db->query("insert into mytable (content".$myarray[0].")");
--
Alex
CodeCharge Developer
"PJ" <apis@globalnet.co.uk> wrote in message
news:a89gto$kgb$1@news.codecharge.com...
>
>
> Sorry that should have read "...across several fields in one table much
the
> same as importing .........."
>
> PJ
>
>
> "PJ" <apis@globalnet.co.uk> wrote in message
>news:a89glg$k69$1@news.codecharge.com...
> > Hi Alexey
> >
> > I want to split the text file (comma separated or whatever is easier)
> across
> > several records in one table much the same as importing data in to a
> desktop
> > application (eg Excel or Access)
> >
> > PJ
> >
> >
> > "Alexey Alexapolsky" <alexa@codecharge.com> wrote in message
> >news:a89fpa$imf$2@news.codecharge.com...
> > > Do you want to split text file on server side into small pieces that
> will
> > go
> > > into different records ? or the whole file should go into 1 record ?
> > >
> > > --
> > > Alex
> > > CodeCharge Developer
> > >
> > >
> > > "PJ" <apis@globalnet.co.uk> wrote in message
> > >news:a89eti$hba$1@news.codecharge.com...
> > > > Can anyone point me in the right direction for advice or an example
of
> a
> > > > user being able to upload text based data to add to a MySQL table
> using
> > > PHP
> > > > in CodaCharge? I have a situation where a user wishes to add up to
> 100
> > > > records per day to a database which could be handled easier by
> uploading
> > > > from his PC as a text file.
> > > >
> > > > thanks
> > > >
> > > > PJ
> > > >
> > > >
> > >
> > >
> >
> >
>
>
|
|
|
 |
PJ
|
| Posted: 04/02/2002, 7:05 AM |
|
Very many thanks for your time
PJ
"Alexey Alexapolsky" <alexa@codecharge.com> wrote in message
news:a8c3l5$79u$2@news.codecharge.com...
> Well , it's like this,
> after upload your file stored in a temporary file,
> you should parse it , get necessary chuchks of data,
> and stuff them into database. It's not a CC task , it's pure coding in
> Page/Open event.
> a sketch is below :
>
> $content = file($myfile_name);
> $myarray = $parse($content);
>
> $db->query("insert into mytable (content".$myarray[0].")");
>
>
>
> --
> Alex
> CodeCharge Developer
>
>
> "PJ" <apis@globalnet.co.uk> wrote in message
>news:a89gto$kgb$1@news.codecharge.com...
> >
> >
> > Sorry that should have read "...across several fields in one table much
> the
> > same as importing .........."
> >
> > PJ
> >
> >
> > "PJ" <apis@globalnet.co.uk> wrote in message
> >news:a89glg$k69$1@news.codecharge.com...
> > > Hi Alexey
> > >
> > > I want to split the text file (comma separated or whatever is easier)
> > across
> > > several records in one table much the same as importing data in to a
> > desktop
> > > application (eg Excel or Access)
> > >
> > > PJ
> > >
> > >
> > > "Alexey Alexapolsky" <alexa@codecharge.com> wrote in message
> > >news:a89fpa$imf$2@news.codecharge.com...
> > > > Do you want to split text file on server side into small pieces that
> > will
> > > go
> > > > into different records ? or the whole file should go into 1 record ?
> > > >
> > > > --
> > > > Alex
> > > > CodeCharge Developer
> > > >
> > > >
> > > > "PJ" <apis@globalnet.co.uk> wrote in message
> > > >news:a89eti$hba$1@news.codecharge.com...
> > > > > Can anyone point me in the right direction for advice or an
example
> of
> > a
> > > > > user being able to upload text based data to add to a MySQL table
> > using
> > > > PHP
> > > > > in CodaCharge? I have a situation where a user wishes to add up
to
> > 100
> > > > > records per day to a database which could be handled easier by
> > uploading
> > > > > from his PC as a text file.
> > > > >
> > > > > thanks
> > > > >
> > > > > PJ
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
|
|
|
 |