|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Hi everyone,
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 $field1|$field2|$fields3|$field4 I need to be ale to print how may records are in the file. And to return 10 results at a time. Any ideas, Wazza |
|
#2
|
|||
|
|||
|
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 /|/; } [/code] |
|
#3
|
|||
|
|||
|
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, Wazza |
|
#4
|
|||
|
|||
|
>>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. |
|
#5
|
|||
|
|||
|
Thanks mate,
Thats exactly what im after. Never even thought about looking at a guest book script ![]() Thanks again, wazza |
|
#6
|
|||
|
|||
|
removed
[This message has been edited by wazza (edited September 06, 2000).] |
|
#7
|
|||
|
|||
|
.
|
|
#8
|
|||
|
|||
|
never mind ill figure it out
|
|
#9
|
|||
|
|||
|
<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. [/quote] What you get in return is that someday, someone might share code with YOU when you get stuck... |
|
#10
|
|||
|
|||
|
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. |
|
#11
|
|||
|
|||
|
<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) |
|
#12
|
|||
|
|||
|
Come on guys dont` stress.
I ended up getting it all working. So its all Good ![]() Cheers. Wazza |
|
#13
|
|||
|
|||
|
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.
Raghu. |
|
#14
|
|||
|
|||
|
>>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. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > Results from a flatfile db? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|