Redian新闻
>
cgi GET method: display results for the 1st time
avatar
cgi GET method: display results for the 1st time# Programming - 葵花宝典
h*r
1
Need one in Jan and return in Feb. Is it possible?
avatar
a*6
2
【求职招聘】诚聘神经、骨科、肿瘤、干细胞、内分泌、妇科方向兼职
公司介绍:为客户提供实验整体设计,文章润色修改,文章及基金书写指导等服务。
应聘要求:神经、骨科、肿瘤、干细胞、内分泌、妇科方向或者其他生物医学背景,优
先。有较强的科研敏锐力,科研思维活
跃,或者科研文章英文写作流利快速,工作认真负责。所有工作内容均直接单个详谈。
工作待遇:招收兼职,时间完全自己掌握,按单个案例计算工资(每单案例不低于5000
人民币)
欢迎联系(来信标题请注明专业方向,并把详细简历放在附件):
Email: [email protected]
/* */
公司QQ: 2691267904
avatar
e*s
3
三体的第二舰队在金牛星系发生大规模宇宙战争,战况惨烈,胜负不详。大刘似乎没讲
清楚。谁能给展开说说?
avatar
w*s
4
say my url is
http://10.50.1.2/mycgi.pl?records_per_page=10
it'll display 10 lines in the page.
now if you click the link from the main page,
the url is actually,
http://10.50.1.2/mycgi.pl
so you click it, no lines will displayed in the page.
Then you need to click the "submit" to see results.
If i want to see 10 lines by default at the 1st time,
how should i do that ?
avatar
h*a
5
大刘都没将清楚,我们怎么ZKSS?

【在 e*******s 的大作中提到】
: 三体的第二舰队在金牛星系发生大规模宇宙战争,战况惨烈,胜负不详。大刘似乎没讲
: 清楚。谁能给展开说说?

avatar
p*t
6
打不开网站啊。

【在 w*s 的大作中提到】
: say my url is
: http://10.50.1.2/mycgi.pl?records_per_page=10
: it'll display 10 lines in the page.
: now if you click the link from the main page,
: the url is actually,
: http://10.50.1.2/mycgi.pl
: so you click it, no lines will displayed in the page.
: Then you need to click the "submit" to see results.
: If i want to see 10 lines by default at the 1st time,
: how should i do that ?

avatar
X*r
7
Many ways to do it, e.g.
1) make mycgi.pl have a default 'records_per_page' of 10 (or whatever number
you want on the first page).
OR
2) change the link on the main page to point to 'mycgi.pl?records_per_page=
10'

【在 w*s 的大作中提到】
: say my url is
: http://10.50.1.2/mycgi.pl?records_per_page=10
: it'll display 10 lines in the page.
: now if you click the link from the main page,
: the url is actually,
: http://10.50.1.2/mycgi.pl
: so you click it, no lines will displayed in the page.
: Then you need to click the "submit" to see results.
: If i want to see 10 lines by default at the 1st time,
: how should i do that ?

avatar
w*s
8
how to do the option 1 pls ?

number

【在 X****r 的大作中提到】
: Many ways to do it, e.g.
: 1) make mycgi.pl have a default 'records_per_page' of 10 (or whatever number
: you want on the first page).
: OR
: 2) change the link on the main page to point to 'mycgi.pl?records_per_page=
: 10'

avatar
X*r
9
By changing the perl source code, of course. I assume you're the developer?

【在 w*s 的大作中提到】
: how to do the option 1 pls ?
:
: number

avatar
d*n
10
1.server 方面,每次用户submit时候,同时返回一个当前记录的指针。
这个指针用来跟踪哪10个记录已经被显示了。作为一个parameter 回到你
的perl script中。
假设你用 perl+mysql
sub get_nth_record{
$nth=$_[0]; // keep user returned pointer
$stmt=$_[1]; // and more params
mysql="SELECT * from myTABLE where conditions limit nth,nth+10";

return mysql_results;
}
^好久不用perl了,惭愧
2.if you do it from client side, that will be better.
use javascript. save all the results (if not too many) into an array object.
keep a global value/pointer to save current record. only to display nth 10
records. that is basic.

【在 w*s 的大作中提到】
: say my url is
: http://10.50.1.2/mycgi.pl?records_per_page=10
: it'll display 10 lines in the page.
: now if you click the link from the main page,
: the url is actually,
: http://10.50.1.2/mycgi.pl
: so you click it, no lines will displayed in the page.
: Then you need to click the "submit" to see results.
: If i want to see 10 lines by default at the 1st time,
: how should i do that ?

avatar
w*s
11
brother, i know you have been warmhearted to help,
but if if you treat Chinese just like Indians treat Indians,
then you will have more chance to survive in IT in the future.
i got this from linuxquestions,
In your program, check for environment variable QUERY_STRING: if it is empty
, simply act as if it were record_per_page=10
what happened is i was too tired and forget to take care the default for one
of the variables.

【在 X****r 的大作中提到】
: By changing the perl source code, of course. I assume you're the developer?
avatar
w*s
12
thanks a lot !

【在 d****n 的大作中提到】
: 1.server 方面,每次用户submit时候,同时返回一个当前记录的指针。
: 这个指针用来跟踪哪10个记录已经被显示了。作为一个parameter 回到你
: 的perl script中。
: 假设你用 perl+mysql
: sub get_nth_record{
: $nth=$_[0]; // keep user returned pointer
: $stmt=$_[1]; // and more params
: mysql="SELECT * from myTABLE where conditions limit nth,nth+10";
:
: return mysql_results;

avatar
X*r
13
Thanks for the advice. Next time I should resist the temptation
that would end in digging a hole for myself when browsing.

empty
one

【在 w*s 的大作中提到】
: brother, i know you have been warmhearted to help,
: but if if you treat Chinese just like Indians treat Indians,
: then you will have more chance to survive in IT in the future.
: i got this from linuxquestions,
: In your program, check for environment variable QUERY_STRING: if it is empty
: , simply act as if it were record_per_page=10
: what happened is i was too tired and forget to take care the default for one
: of the variables.

avatar
w*s
14
you can search answers in google if you know what to search,
same as my question.
since i didn't know the answer, i didn't know what to ask.
certainly i appreciate your help a lot !

【在 X****r 的大作中提到】
: Thanks for the advice. Next time I should resist the temptation
: that would end in digging a hole for myself when browsing.
:
: empty
: one

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。