September 1st, 2000, 01:31 AM
What i need to do is get the results from a flatfile.
While only displaying 10 results at a time. And a next button or maybe search feature to view the rest.
heres how the flatfile is done
I need to be ale to print how may records are in the file.
And to return 10 results at a time.
September 1st, 2000, 03:42 AM
Best bet, if the file isn't too huge, is to just dump the entire file into a big ol' array (if the file is <10k in size, this approach will be fine -- bigger than that you might want to look at how the file is used to see where optimisations could be made). Use the following to get your records into a list:
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
my @records = ();
open FH, 'filename';
while( <FH> )
push @records, split /|/;
September 1st, 2000, 04:36 AM
What i actually need to do is have a number display at the top of the page telling me how many records are in the particular file.
And returning 10 results at a time. With a next 10 results link.
This is the last thing i need to work out for this particular script. Hopefully i can find the answer here.
Thanks for the reply,
September 1st, 2000, 06:02 AM
>>Hopefully i can find the answer here
I am sure alot of people here know how to do it including me. I am not trying to be selfish but I don't want to post my codes here with nothing in return.
The best I can offer is to give you a link to download particular script that can do what you requested, then you are on your own to figure it out. If you don't understand some of the codes after spending your time and of course, with effort, then feel free to post it here.
Here is the link -> http://www.dcscripts.com/
and get 'dcguest' script.
September 1st, 2000, 06:10 AM
Thats exactly what im after. Never even thought about looking at a guest book script
September 1st, 2000, 09:10 PM
[This message has been edited by wazza (edited September 06, 2000).]
September 3rd, 2000, 07:17 PM
September 6th, 2000, 01:43 AM
never mind ill figure it out
September 6th, 2000, 08:42 AM
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by freebsd:
>>I am not trying to be selfish but I don't want to post my codes here with nothing in return.
What you get in return is that someday, someone might share code with YOU when you get stuck...
September 6th, 2000, 12:21 PM
There is no free lunch in the world. Especially in a public forum like this. If he is struggling, he can always hire someone to do it for him. If you are really that kind, why don't you post your codes and help him out then? Futher, I already posted a link to solve his exact problem if he still can't figure it out, he is on his own as I mentioned.
>>someone might share code with YOU when you get stuck...
Yeah. What if I get stuck, I would do some searching on the net to find an answer and solve it on my own. But so far that hasn't happened to me that often.
September 7th, 2000, 05:01 AM
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by turbobri:
What you get in return is that someday, someone might share code with YOU when you get stuck...[/quote]
Are you about the not documentary possibilities and the closed program codes of Microsoft? (Joke)
September 7th, 2000, 05:24 AM
Come on guys dont` stress.
I ended up getting it all working. So its all Good
September 12th, 2000, 04:44 AM
Wazza, did you find any answer for your flat file question, coz i didnt find any answer there in the forum, only arguments between the members.
September 13th, 2000, 01:35 AM
>>coz i didnt find any answer there in the forum
As I said, read the link I posted in this thread. Read my 1st reply above.