php-windows Digest 11 Feb 2003 23:59:27 -0000 Issue 1583

2003-02-11 Thread php-windows-digest-help
php-windows Digest 11 Feb 2003 23:59:27 - Issue 1583 Topics (messages 18447 through 18472): reading lines from a file 18447 by: George Pitcher 18448 by: Svensson, B.A.T. (HKG) 18449 by: George Pitcher 18451 by: Svensson, B.A.T. (HKG) 18452 by: George P

AW: [PHP-WIN] reading lines from a file

2003-02-11 Thread Sven Schnitzke
Dear Mr. Svensson, I understand your points (well - mostly) but - pleeez don't get too fundamental over that !! -- This thread is up to 21postings by now and if I knew a better NG I'd suggest a follow up there! This one is for helping people get going with PHP in WIN environment, and as f

RE: [PHP-WIN] reading lines from a file

2003-02-11 Thread Svensson, B.A.T. (HKG)
If I understand you correctly; the reason why you implemented this in PHP is because PHP is what you are good/best at? Also excuse my limited ignorant knowledge about PHP, but my impression about PHP is that it is runs as an instance of the web server or something? (Please, correct me if I made an

RE: [PHP-WIN] reading lines from a file

2003-02-11 Thread Svensson, B.A.T. (HKG)
Hi Chris, in general I agree with you. My remark were against using a web server for this, running as a thread under it - or whatever. If somebody do that, then they waste unnecessary system resources. Maybe I had a to strong opinion in the first letter; writing in a haste at work while occupied

RE: [PHP-WIN] reading lines from a file

2003-02-11 Thread George Pitcher
Chris, et al, Nope, I never mentioned the command line at all, but it is probably how I would have done it if I hadn't passed it over to the PERL guys. It would have been useful to go through a parsing routine just to learn how its done (never know when it might be a useful trick). Even so, I st

RE: [PHP-WIN] reading lines from a file

2003-02-11 Thread Chris Kranz
Didn't he just say parse it via command line tho? This wouldn't take away resources from the web server? Personally, large batches like this shouldn't be done on your live webserver anyway. No matter how you accomplish it, your taking away a lot of system resources. Best way to do it, is to parse

Re: [PHP-WIN] reading lines from a file

2003-02-11 Thread Ignatius Reilly
Hi Anders, Well, of course the parser will consume full resources during several minutes. But I trust our old fellow George would do the parsing on a separate machine, and only do the LOAD DATA LOCAL on the production machine at night or such. My question was more as to whether there is a fundame

RE: [PHP-WIN] reading lines from a file

2003-02-11 Thread Svensson, B.A.T. (HKG)
> I trust that I am not the only one to be curious to > learn more concerning your remark. [...] > Would you care to explain in more details why PHP is > a MUST DON'T to do this? Hi, Thanx for your comment. One can talk about things like load balance for scalability, and other boring subjects,

Re: [PHP-WIN] reading lines from a file

2003-02-11 Thread Ignatius Reilly
Hi Mr Svensson , I trust that I am not the only one to be curious to learn more concerning your remark. I routinely parse files similar to those of Mr Pitcher, using PHP from the Windows command line. So far I have never had any problem generating CSV files containing about a million rows (Celero

RE: [PHP-WIN] reading lines from a file

2003-02-11 Thread Svensson, B.A.T. (HKG)
Point taken. But I don't understand why you take this personally? Maybe I should have written "one" instead of "you"? Anyhow; First; If a programmer suggest to parse an "huge file" via a web based script; that programmer is an idiot and should be fired. Period. Secondly; weather or not you are

[PHP-WIN] RE: MySQL: some script I must do

2003-02-11 Thread Beach, Jim
I asked this question in a forum last week and finally got a helpful answer. I'm new to databases and I knew how to upload an html file through a typical ftp client but I couldn't get my head around the concept of uploading a MySQL database. I'm using phpMyAdmin to manage MySQL. BTW, TFM was no he

RE: [PHP-WIN] reading lines from a file

2003-02-11 Thread Jill . Ramonsky
Hey, it's not our place to say what someone else can and cannot code. If someone asks me "What's the function that reads a line from a file?" I'm happy to answer it. What they want to use that function for is not my problem - nor yours. In this forum we can hopefully get answers to questions alon

RE: [PHP-WIN] reading lines from a file

2003-02-11 Thread Svensson, B.A.T. (HKG)
You DON'T parse large record based file with a web scripting language. It is as bad recommendation to suggest it. And you just don't do that. > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 11, 2003 1:27 PM > To: [EMAIL PROTECTED] > Subje

[PHP-WIN] Re: reading lines from a file

2003-02-11 Thread J.Veenhuijsen
Is this the same problem we discussed a week ago?? Jochem George Pitcher wrote: Hi, I have a huge file that I want to get into a db format. There are over 5000 records and I need to create fieldnames on the fly. Each record comprises a number of lines (fields) containing 2 elements (fieldname

RE: [PHP-WIN] reading lines from a file

2003-02-11 Thread Jill . Ramonsky
Yes fgets() It's in the section Filesystem functions. (What a surprise) You might like the function file() also. Jill -Original Message- From: George Pitcher [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 11, 2003 12:25 PM To: Chris Kranz; [EMAIL PROTECTED] Subject: RE: [PHP-WIN] re

RE: [PHP-WIN] reading lines from a file

2003-02-11 Thread George Pitcher
Anders, Thanks - I'll see if I can persuade one of the PERL people here to have a go. Ta. george > -Original Message- > From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]] > Sent: 11 February 2003 12:24 pm > To: George Pitcher > Cc: [EMAIL PROTECTED] > Subject: RE: [PHP-WIN] reading

[PHP-WIN] Re: [PHP-INST] Re: Problems with mail()

2003-02-11 Thread "Juan Ant. Marti'nez"
Hi, First of all, thanks for the suggestions. My problem is 'almost' solved. I have succeeded sending an e-mail with the mail function. The problem was in the php.ini file. I had limited the execution of phpinfo() and system() commands. If I enable both commands, the mail() function works fine

RE: [PHP-WIN] reading lines from a file

2003-02-11 Thread George Pitcher
Chris, I couldn't find any readline function in the manual - did I miss it? It isn't as simple as you say, because, to start with, I don't know how many fields there are going to be, I don't know how I'm going to build my array to record-level sets. I'm not really looking for someone to provide

RE: [PHP-WIN] reading lines from a file

2003-02-11 Thread Svensson, B.A.T. (HKG)
before you do anything else, you need to do the following: * decide what data in this file that you need * create a data model based on this data * sufficiently normalize your data * implement a database schema according to the normalized data * write a parser that parse data according to the RDBM

RE: [PHP-WIN] reading lines from a file

2003-02-11 Thread Chris Kranz
So all you need to do, is read the file in, line by line (see the php manual) and then break up each line into an array to be added to the db. This is fairly basic stuff, you just need to look in the php manual, it sounds like you don't really have a problem as such, you just want someone to tell

Re: [PHP-WIN] reading lines from a file

2003-02-11 Thread Vladimir Galkov
somth like this may be: $f_array = file (FILE_NAME); for ($i=0; $i ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ: [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Yes, eventually. I want to come up with a good method because this file is > going to be supplied to me on a fairly regular basis. > > George >

RE: [PHP-WIN] reading lines from a file

2003-02-11 Thread George Pitcher
Yes, I suppose I do. I want to be able to take my file, work out a complete of fieldnames and then create an array which could then be used to, initially, create a table in MySQL. I'm not using MySQL for my main system which is based on FileMaker, but will be moving later this year to MySQL, so i

RE: [PHP-WIN] reading lines from a file

2003-02-11 Thread Svensson, B.A.T. (HKG)
Then you need to write a parser. What's the basic problem then? > -Original Message- > From: George Pitcher [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 11, 2003 11:59 AM > To: Svensson, B.A.T. (HKG); [EMAIL PROTECTED] > Subject: RE: [PHP-WIN] reading lines from a file > > > Yes,

[PHP-WIN] RE: MySQL: some script I must do

2003-02-11 Thread Uttam
i think u shld refer this to mysql mailing list ([EMAIL PROTECTED] / [EMAIL PROTECTED]) . -Original Message- From: Rui [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 11, 2003 02:02 To: [EMAIL PROTECTED] Subject: MySQL: some script I must do First of all, I must thank all the people w

RE: [PHP-WIN] reading lines from a file

2003-02-11 Thread George Pitcher
Yes, eventually. I want to come up with a good method because this file is going to be supplied to me on a fairly regular basis. George > -Original Message- > From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]] > Sent: 11 February 2003 10:56 am > To: George Pitcher; [EMAIL PROTECTED]

RE: [PHP-WIN] reading lines from a file

2003-02-11 Thread Svensson, B.A.T. (HKG)
What do you want to do? Parse the file into tab-delimited data in order to bulk load it into the database? > -Original Message- > From: George Pitcher [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 11, 2003 11:41 AM > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] reading lines from a fi

[PHP-WIN] reading lines from a file

2003-02-11 Thread George Pitcher
Hi, I have a huge file that I want to get into a db format. There are over 5000 records and I need to create fieldnames on the fly. Each record comprises a number of lines (fields) containing 2 elements (fieldname [first 5 chars (which need rtrimming)], value [rest of line, some with lots of tex

php-windows Digest 11 Feb 2003 10:02:26 -0000 Issue 1582

2003-02-11 Thread php-windows-digest-help
php-windows Digest 11 Feb 2003 10:02:26 - Issue 1582 Topics (messages 18440 through 18446): MySQL: some script I must do 18440 by: Rui 18442 by: Cam Dunstan 18443 by: Rui 18444 by: Cam Dunstan 18446 by: Svensson, B.A.T. (HKG) MySQL Dump 18441

RE: [PHP-WIN] MySQL: some script I must do

2003-02-11 Thread Svensson, B.A.T. (HKG)
> I must run some kind of script but I don't know what. > Tried: > \.data.sql > I had to put the also the source, but when I pressed Enter key, an error > apears "ERROR 1046: No database selected" > > What's wrong? You haven't RTFM. -- PHP Windows Mailing List (http://www.php.net/) To unsu