本文整理汇总了PHP中sql_db::findByColumn方法的典型用法代码示例。如果您正苦于以下问题:PHP sql_db::findByColumn方法的具体用法?PHP sql_db::findByColumn怎么用?PHP sql_db::findByColumn使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sql_db
的用法示例。
在下文中一共展示了sql_db::findByColumn方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<input type="text" id="surname" name="surname" value="" placeholder="Příjmení">
<input type="text" id="nick" name="nick" value="" placeholder="Přezdívka člena">
<input type="text" id="birth" name="birth" value="" placeholder="Rok narození">
<input type="text" id="address" name="address" placeholder="Ulice, č.p.">
<input type="text" id="city" name="city" value="" placeholder="Město">
<input type="text" id="zip" name="zip" value="" placeholder="PSČ">
<input type="text" id="country" name="country" value="" placeholder="Stát">
<input type="text" id="email" name="email" value="" placeholder="E-mail" class="wide">
<textarea class="wide" name="how" id="how" placeholder="Jak ses o nás dozvěděl?"></textarea>
<textarea class="wide" name="note" id="note" placeholder="Poznámky"></textarea>
<span>Distribuce 64bit:</span>
<select name="distribution" id="distribution">
<?php
while ($tpl = $db->findByColumn("cfg_templates", "templ_supported", "1", "templ_order, templ_label")) {
echo '<option value="' . $tpl["templ_id"] . '">' . $tpl["templ_label"] . '</option>';
}
?>
</select>
<span>Preferovaná lokace pro VPS:</span>
<select name="location" id="location">
<?php
$sql = 'SELECT location_id, location_label
FROM locations l
INNER JOIN servers s ON l.location_id = s.server_location
WHERE s.environment_id = ' . $db->check(ENVIRONMENT_ID) . '
GROUP BY location_id
ORDER BY location_id';
$rs = $db->query($sql);
示例2: in_array
<textarea name="note" id="note" class="<?php
echo in_array('notes', $errors) ? 'error' : '';
?>
"
placeholder="Poznámky"><?php
echo $_POST['notes'];
?>
</textarea>
<span>Distribuce 64bit:</span>
<select name="distribution" id="distribution" class="<?php
echo in_array('distribution', $errors) ? 'error' : '';
?>
">
<?php
while ($tpl = $db->findByColumn("cfg_templates", "templ_supported", "1", "templ_order, templ_label")) {
echo '<option value="' . $tpl["templ_id"] . '" ' . ($tpl['templ_id'] == $_POST['distribution'] ? 'selected' : '') . '>' . $tpl["templ_label"] . '</option>';
}
?>
</select>
<span>Preferovaná lokace pro VPS:</span>
<select name="location" id="location" class="<?php
echo in_array('location', $errors) ? 'error' : '';
?>
">
<?php
while ($loc = $db->findByColumn("locations", "location_type", "production", "location_id")) {
echo '<option value="' . $loc["location_id"] . '"' . ($tpl['location_id'] == $_POST['location'] ? 'selected' : '') . '>Master Internet ' . $loc["location_label"] . '</option>';
}
?>