当前位置: 首页>>代码示例>>PHP>>正文


PHP Slug::like方法代码示例

本文整理汇总了PHP中Slug::like方法的典型用法代码示例。如果您正苦于以下问题:PHP Slug::like方法的具体用法?PHP Slug::like怎么用?PHP Slug::like使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Slug的用法示例。


在下文中一共展示了Slug::like方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Slug

<?php

$s = new Slug();
$slug_count = $s->like('id', 'category.', 'after')->count();
$c = new Category();
$content_count = $c->count();
if ($slug_count < $content_count) {
    $slugs = array();
    $c = new Category();
    foreach ($c->select('slug')->get_iterated() as $content) {
        $slugs[] = "('category." . $content->slug . "')";
    }
    $slugs = join(', ', $slugs);
    $this->db->query("INSERT INTO {$s->table}(id) VALUES {$slugs} ON DUPLICATE KEY UPDATE id=id;");
}
$done = true;
开发者ID:Atomox,项目名称:benhelmerphotography,代码行数:16,代码来源:0022.php

示例2: Slug

<?php

$s = new Slug();
$slug_count = $s->like('id', 'page.', 'after')->count();
$c = new Text();
$content_count = $c->where('page_type', 1)->count();
if ($slug_count < $content_count) {
    $slugs = array();
    $c = new Text();
    foreach ($c->where('page_type', 1)->select('slug')->get_iterated() as $content) {
        $slugs[] = "('page." . $content->slug . "')";
    }
    $slugs = join(', ', $slugs);
    $this->db->query("INSERT INTO {$s->table}(id) VALUES {$slugs} ON DUPLICATE KEY UPDATE id=id;");
}
$done = true;
开发者ID:Atomox,项目名称:benhelmerphotography,代码行数:16,代码来源:0020.php

示例3: Slug

<?php

$s = new Slug();
$slug_count = $s->like('id', 'essay.', 'after')->count();
$c = new Text();
$content_count = $c->where('page_type', 0)->count();
if ($slug_count < $content_count) {
    $slugs = array();
    $c = new Text();
    foreach ($c->where('page_type', 0)->select('slug')->get_iterated() as $content) {
        $slugs[] = "('essay." . $content->slug . "')";
    }
    $slugs = join(', ', $slugs);
    $this->db->query("INSERT INTO {$s->table}(id) VALUES {$slugs} ON DUPLICATE KEY UPDATE id=id;");
}
$done = true;
开发者ID:Atomox,项目名称:benhelmerphotography,代码行数:16,代码来源:0021.php

示例4: Slug

<?php

$s = new Slug();
$slug_count = $s->like('id', 'content.', 'after')->count();
$c = new Content();
$content_count = $c->count();
if ($slug_count < $content_count) {
    $slugs = array();
    $c = new Content();
    foreach ($c->select('slug')->get_iterated() as $content) {
        $slugs[] = "('content." . $content->slug . "')";
    }
    $slugs = join(', ', $slugs);
    $this->db->query("INSERT INTO {$s->table}(id) VALUES {$slugs} ON DUPLICATE KEY UPDATE id=id;");
}
$done = true;
开发者ID:Atomox,项目名称:benhelmerphotography,代码行数:16,代码来源:0018.php

示例5: Slug

<?php

$s = new Slug();
$slug_count = $s->like('id', 'album.', 'after')->count();
$c = new Album();
$content_count = $c->count();
if ($slug_count < $content_count) {
    $slugs = array();
    $c = new Album();
    foreach ($c->select('slug')->get_iterated() as $content) {
        $slugs[] = "('album." . $content->slug . "')";
    }
    $slugs = join(', ', $slugs);
    $this->db->query("INSERT INTO {$s->table}(id) VALUES {$slugs} ON DUPLICATE KEY UPDATE id=id;");
}
$done = true;
开发者ID:Atomox,项目名称:benhelmerphotography,代码行数:16,代码来源:0019.php


注:本文中的Slug::like方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。