本文介绍了排序不能在PHP中工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 这里排序不起作用。我已经尝试了很多.sl_no没有更新.adminnersorting.php中的查询无法正常工作.plz帮助我 < script type = text / javascript src = http://ajax.googleapis.com/ajax/libs/jquery /1.3.2/jquery.js\"> < / script > < script type = text / javascript src = http://ajax.googleapis.com/ ajax / libs / jqueryui / 1.7.2 / jquery-ui.js > < / script > < script src = ckeditor / ckeditor.js > < / script > < script type = text / javascript > $(document).ready(function(){ $ .noConflict(); function slideout(){ setTimeout(function(){ // $。noConflict(); $( #response)。slideUp( slow,function(){ } ); }, 2000 );} $( #response)。hide(); $(function(){ $( #list ul)。sortable({opacity: 0 。 8 , cursor:' move',update:function(){ var order = $( this )。sortable( serialize)+ ' & update = update' ; $ .post( partnersorting.php ,order,function(theResponse){alert(theResponse); $( #response )。html(theResponse); $( #response )。slideDown(' slow'); slideout(); }); } }); }); }); < / script > HTML: $ page = $ obg-> fetchpages(PARTNER); $ i = 0; if($ page) {$ / $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ ?> ; } else {?> < img src =../ images / partner / small /height =80width =100/> < img src =images / active.pngborder =0title =Deactive Categorywidth =17/> < img src =images / inactive.pngborder =0title =激活类别width =17/> 编辑 删除 表中没有数据。 partnersorting.php < pre lang = php > <? php include(' ../ includes / connection.php'); $ array = $ _POST [' arrayorder ]; if ($ _POST [' update'] == update){ $ count = 1 ; foreach ($ array as $ idval){ echo $ query = UPDATE .PARTNER。 SET sl_no =。 $ count 。 WHERE id =。 $ idval。 ;; mysql_query($ query); $ count ++; } echo ' 全部得救了!刷新页面以查看更改; } ?> 解决方案 (document).ready(function(){ .noConflict(); function slideout(){ setTimeout(function(){ // .noConflict(); Here sorting is not working.I have tried a lot.The sl_no is not updating.The query in partnersorting.php is not working.plz help me<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js"></script><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.js"></script> <script src="ckeditor/ckeditor.js"></script><script type="text/javascript">$(document).ready(function(){ $.noConflict(); function slideout(){ setTimeout(function(){//$.noConflict(); $("#response").slideUp("slow", function () { }); }, 2000);} $("#response").hide();$(function() {$("#list ul").sortable({ opacity: 0.8, cursor: 'move', update: function() {var order = $(this).sortable("serialize") + '&update=update'; $.post("partnersorting.php", order, function(theResponse){alert(theResponse);$("#response").html(theResponse);$("#response").slideDown('slow');slideout();}); } });});});</script>HTML: $page = $obg->fetchpages(PARTNER); $i = 0; if($page) { foreach($page as $partner) { $i++; ?> "; }else { ?> <img src="../images/partner/small/" height="80" width="100"/> <img src="images/active.png" border="0" title="Deactive Category" width="17" /> <img src="images/inactive.png" border="0" title="Activate Category" width="17" /> Edit Delete No Data Available In The Table. partnersorting.php<pre lang="php"><?php include('../includes/connection.php');$array= $_POST['arrayorder'];if ($_POST['update'] == "update"){$count = 1;foreach ($array as $idval) { echo $query = "UPDATE ".PARTNER." SET sl_no = " . $count . " WHERE id = " . $idval.";"; mysql_query($query) ;$count ++;}echo 'All saved! refresh the page to see the changes';}?> 解决方案 (document).ready(function(){.noConflict(); function slideout(){ setTimeout(function(){//.noConflict(); 这篇关于排序不能在PHP中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-31 02:26