本文整理汇总了PHP中Domain::quote方法的典型用法代码示例。如果您正苦于以下问题:PHP Domain::quote方法的具体用法?PHP Domain::quote怎么用?PHP Domain::quote使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Domain
的用法示例。
在下文中一共展示了Domain::quote方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: is_pendingRecord
static function is_pendingRecord($domain_name = null, $r = array())
{
$awnser = false;
if (count($r) > 0) {
$qFindResult = Queue::find('first', array('conditions' => 'commit_date IS NULL AND closed = 0 AND domain_name=' . Domain::quote($domain_name)));
if (count($qFindResult->queue_item_records) > 0) {
foreach ($qFindResult->queue_item_records as $key) {
if ($key->name === $r->name && $key->content === $r->content && $key->type === $r->type) {
return $awnser = true;
}
}
}
}
return $awnser;
}
示例2: record_count
public function record_count()
{
$result = Domain::get_all(array('conditions' => 'd.name=' . Domain::quote($this->name)));
return $result[0]['record_count'];
}
示例3: function
document.observe("dom:loaded", function() { Form.focusFirstElement($('queryForm')); });
</script>
Search through domains (name) and records (name/content). SQL 'LIKE' syntax supported: an underscore (_) in pattern matches any single character, a percent sign (%) matches any string of zero or more characters.<br><br>
<form method="GET" id="queryForm" name="queryForm">
<input type="text" name="query" value="<?php
echo isset($_GET['query']) ? $_GET['query'] : '';
?>
">
<input type="submit" name="submit" value="Search">
</form>
<?php
if ($_GET["query"]) {
$dFindResult = Domain::get_all(array('conditions' => 'd.name LIKE ' . Domain::quote($_GET['query'])));
if (is_array($dFindResult) && count($dFindResult) > 0) {
print '<h2>Domains (' . count($dFindResult) . ')</h2>';
print $display->domains_header();
foreach ($dFindResult as $domain) {
print $display->domain($domain);
}
print $display->domains_footer();
print '<br>';
}
flush();
$rFindResult = Record::find('all', array('conditions' => 'name LIKE ' . Record::quote($_GET['query']) . ' OR ' . 'content LIKE ' . Record::quote($_GET['query']), 'order' => 'name'));
if (is_array($rFindResult) && count($rFindResult) > 0) {
print '<h2>Records (' . count($rFindResult) . ')</h2>';
print $display->records_header();
foreach ($rFindResult as $record) {
示例4: domain_delete
public function domain_delete($p)
{
$d = Domain::find('first', array('conditions' => 'name = ' . Domain::quote($p->name)));
$d->destroy();
return true;
}