如何从多个连接表中选择所有列?
DB::table('table as t')->select('t*');
Run Code Online (Sandbox Code Playgroud)
asterix似乎不适用于Laravel?谢谢!
每当我在模型中使用get_where时,它都会给我所有数据库条目,包括重复,当我使用get时它只给我第一个条目.但我想要所有不同的条目.任何人都可以帮助我.非常感谢!
Controler = site.php:
public function western_australia(){
$this->load->model("continents_get");
$data["results"] = $this->continents_get
->getMaincategories("western_australia");
$this->load->view("content_western_australia", $data);
}
Run Code Online (Sandbox Code Playgroud)
model = continents_get.php
function getMaincategories($western_australia){
$this->db->distinct();
$query = $this->db->get_where("p_maincategories",
array("page" => $western_australia));
return $query->result();
}
Run Code Online (Sandbox Code Playgroud)
view = content_western_australia.php
<?php
foreach($results as $row){
$page = $row->page;
$main_en = $row->main_en;
echo $main_en;
?>
Run Code Online (Sandbox Code Playgroud) 我有一个顶部菜单,其中包含三个无序列表项。单击的列表项应向左移动到第一个位置。我用 prepend() 尝试了一些东西,如下所示,但我没有让它工作。感谢您的任何提示。
html:
<div class='subpage_top_nav'>
<ul>
<li><a href='#'><center>Gabione</center></a></li>
<li><a href='#'><center>Bewerte Erde</center></a></li>
<li><a href='#'><center>Natursteinsatz</center></a></li>
</ul>
</div>
Run Code Online (Sandbox Code Playgroud)
jQuery:
$('.subpage_top_nav li').click(function(e) {
e.preventDefault();
$(this).parent().append(this);
});
Run Code Online (Sandbox Code Playgroud) 当我通过以下任一版本检索信息时,我得到了正确的结果:
window.screen.height
Run Code Online (Sandbox Code Playgroud)
VS:
screen.height
Run Code Online (Sandbox Code Playgroud)
是否需要/建议写"窗口".部分,还是我可以把它留下来?
这是否也适用于访问document.properties/methods和其他对象 - 我从不需要编写'文档'.部分(或我访问的任何对象)?
单击行的选择按钮时,会弹出一个确认框.
确认该框后,选择按钮将被禁用,并附加一条应淡出的消息.
按钮禁用和消息附加工作都只能工作一秒钟.该按钮不会保持禁用状态.此消息也正确附加,但也只是一秒钟.
我可以将fadeOut(Int)更改为任何整数但仍然只显示一秒钟的消息.为什么功能只能工作一秒钟?
<script>
$('#button_<?php echo $platform->id; ?>').click(function() {
var choice = confirm('Please confirm that you wish to do the following Platform: <?php echo $platform->company; ?>');
if (choice == true) {
$('#button_<?php echo $platform->id; ?>').prop("disabled", true);
$('.job_confirm').css('visibility', 'visible');
$('.job_confirm').append('The Job has been added to your Userarea -->');
$('.job_confirm').fadeOut(5000);
}
});
</script>
Run Code Online (Sandbox Code Playgroud) javascript ×2
jquery ×2
codeigniter ×1
eloquent ×1
laravel ×1
laravel-4 ×1
mysql ×1
object ×1
php ×1