當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。