|
Re: input a section of a large file [message #171657 is a reply to message #171656] |
Fri, 14 January 2011 18:00 |
Adrienne Boswell
Messages: 25 Registered: October 2010
Karma: 0
|
Junior Member |
|
|
Gazing into my crystal ball I observed richard <member(at)newsguy(dot)com>
writing in news:1d4pessmkmgis$(dot)dlg(at)evanplatt(dot)sux:
> Just being curious.
> Is it possible in php to acquire information from a file in part,
> rather than retrieving the whole file?
> I have a series of tables that I would prefer not showing up on the
> main page when loaded. When the user clicks the link, the tables would
> appear. Rather than uploading a thousand small files, I'd rather
> upload a dozen or so files and retrieive the tables as needed.
>
> http://1littleworld.net/tables1.html
>
> Just a rough draft to show what I'm talking about. I know there is no
> character encoding so don't be bitching about it not validating.
>
SELECT fields FROM table WHERE condition ORDER BY field LIMIT number
--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
|
|
|
|
|
Re: input a section of a large file [message #171661 is a reply to message #171659] |
Fri, 14 January 2011 19:01 |
Luuk
Messages: 329 Registered: September 2010
Karma: 0
|
Senior Member |
|
|
On 14-01-11 19:25, richard wrote:
> On Fri, 14 Jan 2011 10:41:19 -0700, richard wrote:
>
>> Just being curious.
>> Is it possible in php to acquire information from a file in part, rather
>> than retrieving the whole file?
>> I have a series of tables that I would prefer not showing up on the main
>> page when loaded. When the user clicks the link, the tables would appear.
>> Rather than uploading a thousand small files, I'd rather upload a dozen or
>> so files and retrieive the tables as needed.
>>
>> http://1littleworld.net/tables1.html
>>
>> Just a rough draft to show what I'm talking about. I know there is no
>> character encoding so don't be bitching about it not validating.
>
> Perhaps to clarify a little, I am thinking of something in the way of using
> file_get_contents as a means to open the file, then retrieving the
> particular item I want within that file.
yes, its possible,
but its also pissoble for a mouse,
to stamp on a bridge, and say to the elephant next to him,
we're doing great aren't we....
It would me much easier to do things in MySQL if you want this
or, a a second option, to store the data in different files,
But WHY all date in 1 large file?????
--
Luuk
|
|
|
Re: input a section of a large file [message #171662 is a reply to message #171659] |
Fri, 14 January 2011 19:31 |
Denis McMahon
Messages: 634 Registered: September 2010
Karma: 0
|
Senior Member |
|
|
On 14/01/11 18:25, richard wrote:
> On Fri, 14 Jan 2011 10:41:19 -0700, richard wrote:
>
>> Just being curious.
>> Is it possible in php to acquire information from a file in part, rather
>> than retrieving the whole file?
Yes, you can read a line at a time.
>> I have a series of tables that I would prefer not showing up on the main
>> page when loaded. When the user clicks the link, the tables would appear.
>> Rather than uploading a thousand small files, I'd rather upload a dozen or
>> so files and retrieive the tables as needed.
If you want to use text files that contain data (for example csv data)
that you will use to create tables, it would probably be best to have a
separate file containing the data for each table that you wish to create.
You could also write a script off-line to create html tables that are
output as included php files. This would save the resources involved in
repeated conversion to html using php of static data in text files.
> Perhaps to clarify a little, I am thinking of something in the way of using
> file_get_contents as a means to open the file, then retrieving the
> particular item I want within that file.
If a file contains data for lots of tables, how will you know where in
the file the data for the table that you want is?
Where are you going to store the offsets? And what implications does
that have for things that need to get updated when the table data files
are changed?
What happens when you discover that all your offsets are wrong due to
differences in cr/lf handling?
Rgds
Denis McMahon
|
|
|
Re: input a section of a large file [message #171671 is a reply to message #171658] |
Sat, 15 January 2011 04:00 |
Adrienne Boswell
Messages: 25 Registered: October 2010
Karma: 0
|
Junior Member |
|
|
Gazing into my crystal ball I observed richard <member(at)newsguy(dot)com>
writing in news:j3opbqdcvvac$(dot)dlg(at)evanplatt(dot)sux:
> On Fri, 14 Jan 2011 18:00:08 +0000 (UTC), Adrienne Boswell wrote:
>
>> Gazing into my crystal ball I observed richard <member(at)newsguy(dot)com>
>> writing in news:1d4pessmkmgis$(dot)dlg(at)evanplatt(dot)sux:
>>
>>> Just being curious.
>>> Is it possible in php to acquire information from a file in part,
>>> rather than retrieving the whole file?
>>> I have a series of tables that I would prefer not showing up on the
>>> main page when loaded. When the user clicks the link, the tables
>>> would appear. Rather than uploading a thousand small files, I'd
>>> rather upload a dozen or so files and retrieive the tables as
>>> needed.
>>>
>>> http://1littleworld.net/tables1.html
>>>
>>> Just a rough draft to show what I'm talking about. I know there is
>>> no character encoding so don't be bitching about it not validating.
>>>
>>
>> SELECT fields FROM table WHERE condition ORDER BY field LIMIT number
>
> Is this from mysql? Did I say I wanted to use mysql?
As others have said in this and previous threads, MySQL is the best tool
for the job. Yes, you can walk from Los Angeles to San Franisco, but
it's a heck of a lot faster and easier to fly.
--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
|
|
|
|
Re: input a section of a large file [message #171673 is a reply to message #171672] |
Sat, 15 January 2011 04:37 |
Adrienne Boswell
Messages: 25 Registered: October 2010
Karma: 0
|
Junior Member |
|
|
Gazing into my crystal ball I observed Sherm Pendley
<sherm(dot)pendley(at)gmail(dot)com> writing in
news:m2ei8e94f6(dot)fsf(at)sherm(dot)shermpendley(dot)com:
> Adrienne Boswell <arbpen(at)yahoo(dot)com> writes:
>
>> As others have said in this and previous threads, MySQL is the best
>> tool for the job. Yes, you can walk from Los Angeles to San
>> Franisco, but it's a heck of a lot faster and easier to fly.
>
> Good advice, but poor example... These days it might actually be
> easier to walk. :-)
>
Actually, I prefer taking the train. I have flown into Oakland airport
many times, and each time, it looked like the plane was going to land in
the water. Finally, I decided it was just too stressful for me, and I
really like trains. I even take my son, and friends, to National Train
Day at Union Station every year.
--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
|
|
|
Re: input a section of a large file [message #171674 is a reply to message #171658] |
Sat, 15 January 2011 04:42 |
Evan Platt
Messages: 124 Registered: November 2010
Karma: 0
|
Senior Member |
|
|
On Fri, 14 Jan 2011 11:15:52 -0700, richard <member(at)newsguy(dot)com>
wrote:
> Is this from mysql?
No, it's a SQL statement.
> Did I say I wanted to use mysql?
No, but you didn't say you didn't want to.
Damn, is the word thank you not in your vocabulary, idiot?
PS: Still waiting for you to explain "As my server is using windows,
..htaccess is kind of useless for me anyway."
But don't worry, we all know you have no answer for that.
--
To reply via e-mail, remove The Obvious and .invalid from my e-mail address.
|
|
|
|
Re: input a section of a large file [message #171676 is a reply to message #171675] |
Sat, 15 January 2011 07:16 |
Michael Vilain
Messages: 88 Registered: September 2010
Karma: 0
|
Member |
|
|
In article <z4p872ushoz5$(dot)dlg(at)evanplatt(dot)sux>,
richard <member(at)newsguy(dot)com> wrote:
> You really have your damn nerve trying to show off your intelligence when
> your own website is a pathetic excuse.
> You haven't done a damn thing with it in two years.
Doesn't excuse being gracious with free help. Guess manners weren't
something taught in your household. Your mother should be ashamed of
herself for raising you this way.
--
DeeDee, don't press that button! DeeDee! NO! Dee...
[I filter all Goggle Groups posts, so any reply may be automatically ignored]
|
|
|
|
Re: input a section of a large file [message #171678 is a reply to message #171658] |
Sat, 15 January 2011 12:35 |
The Natural Philosoph
Messages: 993 Registered: September 2010
Karma: 0
|
Senior Member |
|
|
richard wrote:
> On Fri, 14 Jan 2011 18:00:08 +0000 (UTC), Adrienne Boswell wrote:
>
>> Gazing into my crystal ball I observed richard <member(at)newsguy(dot)com>
>> writing in news:1d4pessmkmgis$(dot)dlg(at)evanplatt(dot)sux:
>>
>>> Just being curious.
>>> Is it possible in php to acquire information from a file in part,
>>> rather than retrieving the whole file?
>>> I have a series of tables that I would prefer not showing up on the
>>> main page when loaded. When the user clicks the link, the tables would
>>> appear. Rather than uploading a thousand small files, I'd rather
>>> upload a dozen or so files and retrieive the tables as needed.
>>>
>>> http://1littleworld.net/tables1.html
>>>
>>> Just a rough draft to show what I'm talking about. I know there is no
>>> character encoding so don't be bitching about it not validating.
>>>
>> SELECT fields FROM table WHERE condition ORDER BY field LIMIT number
>
> Is this from mysql? Did I say I wanted to use mysql?
Otherwise fopen,..fseek..fread(n)..fclose..?
|
|
|
Re: input a section of a large file [message #171680 is a reply to message #171677] |
Sat, 15 January 2011 13:43 |
spambait
Messages: 35 Registered: September 2010
Karma: 0
|
Member |
|
|
In article <u0206lyvndu3(dot)dlg(at)evanplatt(dot)sux>, richard <member(at)newsguy(dot)com> wrote:
> On Fri, 14 Jan 2011 23:16:25 -0800, Michael Vilain wrote:
>
>> In article <z4p872ushoz5$(dot)dlg(at)evanplatt(dot)sux>,
>> richard <member(at)newsguy(dot)com> wrote:
>>
>>> You really have your damn nerve trying to show off your intelligence when
>>> your own website is a pathetic excuse.
>>> You haven't done a damn thing with it in two years.
>>
>> Doesn't excuse being gracious with free help. Guess manners weren't
>> something taught in your household. Your mother should be ashamed of
>> herself for raising you this way.
>
> explain that to mr. platt. For better than two years he's been harassing me
> over any little thing he cares too. so when I harass back, I'm the one who
> gets their ass chewed out. He is a stalker and a nutcase, pure and simple.
One of the things he "harasses" you about is your persistent ingratitude for
all of the free help you receive. Would it kill you to *ask* for help, instead
of demanding it? Would it kill you to say "please" and "thank you" once in a
while? Would it kill you to accept the help you're given graciously, without
arguing with and abusing those who offer it? Your failure to engage, *ever*,
in these common courtesies makes you look like a prick.
|
|
|
Re: input a section of a large file [message #171681 is a reply to message #171675] |
Sat, 15 January 2011 15:54 |
Evan Platt
Messages: 124 Registered: November 2010
Karma: 0
|
Senior Member |
|
|
On Fri, 14 Jan 2011 23:38:12 -0700, richard <member(at)newsguy(dot)com>
wrote:
> You really have your damn nerve trying to show off your intelligence when
> your own website is a pathetic excuse.
You are a pathetic excuse for a human being.
> You haven't done a damn thing with it in two years.
Uhh yes, I have. The photos section is updated quite regularly.
PS: Still waiting for you to explain "As my server is using windows,
..htaccess is kind of useless for me anyway."
Yeah you neglected to quote that in your reply.
--
To reply via e-mail, remove The Obvious and .invalid from my e-mail address.
|
|
|
Re: input a section of a large file [message #171682 is a reply to message #171677] |
Sat, 15 January 2011 15:55 |
Evan Platt
Messages: 124 Registered: November 2010
Karma: 0
|
Senior Member |
|
|
On Sat, 15 Jan 2011 01:02:31 -0700, richard <member(at)newsguy(dot)com>
wrote:
> explain that to mr. platt. For better than two years he's been harassing me
> over any little thing he cares too.
No, I CORRECT you when you make a totally incorrect statement.
> so when I harass back, I'm the one who gets their ass chewed out.
Yep.
> He is a stalker and a nutcase, pure and simple.
I'm a stalker and a nutcase? You're the idiot who posted my home and
work address to usenet groups, and even threatened to come to my work
and house and kick my ass.
Who's the stalker, bullshit bullis?
No, I don't expect you have the balls to reply.
--
To reply via e-mail, remove The Obvious and .invalid from my e-mail address.
|
|
|
Re: input a section of a large file [message #171683 is a reply to message #171673] |
Sat, 15 January 2011 16:10 |
Sherm Pendley
Messages: 33 Registered: September 2010
Karma: 0
|
Member |
|
|
Adrienne Boswell <arbpen(at)yahoo(dot)com> writes:
> Gazing into my crystal ball I observed Sherm Pendley
> <sherm(dot)pendley(at)gmail(dot)com> writing in
> news:m2ei8e94f6(dot)fsf(at)sherm(dot)shermpendley(dot)com:
>
>> Adrienne Boswell <arbpen(at)yahoo(dot)com> writes:
>>
>>> As others have said in this and previous threads, MySQL is the best
>>> tool for the job. Yes, you can walk from Los Angeles to San
>>> Franisco, but it's a heck of a lot faster and easier to fly.
>>
>> Good advice, but poor example... These days it might actually be
>> easier to walk. :-)
>
> Actually, I prefer taking the train.
I intend to do just that next time I travel. It may take a bit longer,
but it's a far more pleasant experience - *especially* given the new
security measures at airports.
> I have flown into Oakland airport
> many times, and each time, it looked like the plane was going to land in
> the water.
The approach into Boston's Logan airport is pretty much the same kind
of experience.
sherm--
--
Sherm Pendley
<http://camelbones.sourceforge.net>
Cocoa Developer
|
|
|