Skip to content

Instantly share code, notes, and snippets.

Karel Hák norbe

  • Cze
Block or report user

Report or block norbe

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@norbe
norbe / WhereMultiInBuilder.php
Created Jan 10, 2017
How to create IN condition on more columns in nette database
View WhereMultiInBuilder.php
/**
* Create where query parts needed for filtering rows by more than 1 value per row.
*
* Example:
* For [[value: 1, type: 2],[value: 2, type: 3]]
* creates (value = 1 AND type = 2) OR (value = 2 AND type = 3)
*
* @author Karel Hák <karel.hak@fregis.cz>
*/
class WhereMultiInBuilder extends \Nette\Object {
@norbe
norbe / TransactionManager.php
Last active Aug 29, 2015
PDO Transaction manager
View TransactionManager.php
<?php
/********************************************************************\
/* This file is part of the FREGIS System (http://www.fregis.cz) \
/* Copyright (c) 2012 Karel Hák, Martin Jelič, Jakub Kocourek \
/* /
/* @license Use it as you want /
/********************************************************************/
namespace Fregis\Database;
View gist:e36f994914da5e2bb43e
# -*- coding: utf-8 -*-
#
# spawn-php.py
# This is a program to spawn php-cgi on windows.
#
# Author: cybergene@gmail.com
#
# Version 1.0
#
@norbe
norbe / config.yaml
Created Mar 10, 2014
PuPHPet: No title provided and :package is not a valid resource reference
View config.yaml
---
vagrantfile-local:
vm:
box: ubuntu-precise1204-x32-vbox43
box_url: 'http://files.vagrantup.com/precise32.box'
hostname: vm.fregis.cz
network:
private_network: 192.168.56.101
forwarded_port: { }
provider:
View Description
NotORM test based on OSI DAYS example (http://www.notorm.com/static/osidays2010.zip).
For testing purpose I was add author_id column to TAG table and then try to load applications filtered by application.author.name and application.tag.author.name in the same time.
Problem is that NotORM doesn't use aliases, so I can't work with one table more than once (from another context).
Do you know how to solve it? Please update my index.php file..
You can’t perform that action at this time.