<script src="js/file.js?<?=filemtime( 'js/file.js' )?>" />
chown reshat:developers /var/www
groupadd developers
usermod -g developers reshat
public function Count($ask_id)
{
$data = array("to_ask_id" => $ask_id);
$stmt = $this->db->prepare("SELECT id FROM ask_like WHERE to_ask_id=(:to_ask_id)");
$stmt->execute($data);
return $stmt->rowCount();
}
Никогда так не делайте.SELECT COUNT(id) ...
.return ($stmt->rowCount() == 0) ? "" : $stmt->rowCount();
$arr = array(
array('желтые', 'зеленые','синие'),
array('длинные','короткие','узкие'),
array('штаны','шорты','трусы'));
function getVariants($arr) {
$variant = array();
$result = array();
$sizearr = sizeof($arr);
function recursiv($arr, $variant, $level, $result, $sizearr){
$level++;
if($level<$sizearr){
foreach ($arr[$level] as $val){
$variant[$level] = $val;
$result = recursiv($arr, $variant, $level, $result, $sizearr);
}
}else{
$result[] = $variant;
}
return $result;
}
$arrays = recursiv($arr, $variant, -1, $result, $sizearr);
$result = array();
foreach ($arrays as $str) {
$result[] = implode(' ', $str);
}
return $result;
}
print_r(getVariants($arr));
CREATE TABLE `prices` (
`user_id` int(10) unsigned NOT NULL,
`goods_id` int(10) unsigned NOT NULL,
`price` int(10) unsigned NOT NULL
);
SELECT * FROM prices WHERE goods_id IN (value1,value2) AND price > 0
<span class="hoverable">sone</span><span class="hoverable">words</span><span class="hoverable">here</span>
<script>
$("span.hoverable").hover(function () {
var word = $(this).html(); // there is a word to send to server
});
</script>