Tag: cakephp 3.0

Cakephp从jquery null中选择

这是我的代码: Animal1 Animal2 Animal3 我点击一下jQuery: $(document).ready(function() { $(“a#animal.dropdown-item”).click(function() { var animalvalue = $(this).attr(“value”); $.ajax({ type: ‘POST’, url: “/mycontroller/”, data: {animalvalue:animalvalue}, cache: false, success: function(data) { alert(data); //$(“#show”).html(data);// here is the part of the problem } }); }) }); 现在我有了我的控制器 – 在这里我“应该”获得价值: $jqueryanimalvalue = $this->request->getdata(‘animalvalue’); 那么让我们看一下SQL语句: $posts = $this->Posts->find() ->select() ->join([ ‘a’ => [ ‘table’ => […]