Pager:在 HTML_Ajax.replace 函数中传递附加参数
抱歉,我的菜鸟问题
我正在使用一个简单的 mvc 模型,将数据放入数据存储中,并将数据库表名称 q 作为视图中的参数传递。
代码:
function showUser(str){
url = 'getuser.php?q='+ str ;
HTML_AJAX.replace('txtHint', url);
}
我正在使用以下寻呼机模块来显示页面。如何将附加表名称作为页面参数文件名中的参数传递?(请参阅下面的代码片段)。这样,单击页面链接就会显示所需的数据库集
代码:
$pager_params = array(
'mode' => 'Sliding',
'append' => false, //don't append the GET parameters to the url
'path' => '',
'fileName' => 'javascript:HTML_AJAX.replace(\'txtHint\',\'getuser.php?pageID=% d\');', //Pager replaces "%d" with the page number...
'perPage' => 10, //show 10 items per page
'delta' => 1,
'itemData' => $Data
);
当前单击链接 pageid 会出现 SQL 错误,因为它没有传递表名称
Sorry for the noob question
I am using a simple mvc model of putting data in datastore and passing the database table name q as a argument from view.
Code:
function showUser(str){
url = 'getuser.php?q='+ str ;
HTML_AJAX.replace('txtHint', url);
}
I am using following pager mod to display pages. How can I pass additional table name as argument in the filename of the page params?(see the below snippet). So that clicking page links show me the required database set
Code:
$pager_params = array(
'mode' => 'Sliding',
'append' => false, //don't append the GET parameters to the url
'path' => '',
'fileName' => 'javascript:HTML_AJAX.replace(\'txtHint\',\'getuser.php?pageID=% d\');', //Pager replaces "%d" with the page number...
'perPage' => 10, //show 10 items per page
'delta' => 1,
'itemData' => $Data
);
Currently clicking the link pageid gives me SQL error since it doesnt pass the table name
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将评论转换为答案:
好的,我确实设法在文件名参数中传递附加参数,其中
$data1
是先前查询中已存储在表名中的参数。并更新函数,但现在的问题是它不替换我正在被覆盖的单独查询的 div。这也可以通过将
append
参数更改为true
来解决。Converting the comment to an answer:
ok i did manage to pass the additional arguments in filename param as
where
$data1
is the already stored in tablename from previous query. and updating the function asbut issue is now its not replacing the div i am getting overwritten separate query. This can be fixed with changing the
append
param totrue
as well.