Skip to content

Instantly share code, notes, and snippets.

SELECT p.prijsID
FROM bbroch_bps_prijs AS p
INNER JOIN bbroch_bps_prijsoption AS table_formaat ON table_formaat.prijsID = p.prijsID AND table_formaat.attribName = 'formaat'
INNER JOIN bbroch_bps_prijsoption AS table_afwerking ON table_afwerking.prijsID = p.prijsID AND table_afwerking.attribName = 'afwerking'
INNER JOIN bbroch_bps_prijsoption AS table_papiersoort ON table_papiersoort.prijsID = p.prijsID AND table_papiersoort.attribName = 'papiersoort'
INNER JOIN bbroch_bps_prijsoption AS table_omvang ON table_omvang.prijsID = p.prijsID AND table_omvang.attribName = 'omvang'
INNER JOIN bbroch_bps_prijsoption AS table_multikleur ON table_multikleur.prijsID = p.prijsID AND table_multikleur.attribName = 'multikleur'
WHERE p.productID = 2 AND p.state = 1 AND (p.prijsEind > NOW() OR p.prijsEind = '0000-00-00')
AND p.prijsStart <= NOW()
@malles
malles / Autocomplete-callback-function.markdown
Created March 4, 2015 00:32
Autocomplete callback function
@malles
malles / config.yaml
Created September 20, 2015 10:10
Pagekit local puPHPet server
vagrantfile:
target: local
vm:
box: puphpet/debian75-x64
box_url: puphpet/debian75-x64
hostname: local.puphpet
memory: '1024'
cpus: '1'
chosen_provider: virtualbox
network:
@malles
malles / config.php
Created September 21, 2015 11:36
Pagekit Config File
<?php return array (
'database' =>
array (
'default' => 'mysql',
'connections' =>
array (
'mysql' =>
array (
'host' => 'localhost',
'user' => 'pagekit',
// ==UserScript==
// @name Dark
// @namespace http://your.homepage/
// @version 0.1
// @description enter something useful
// @author You
// @match https://github.com/
// @match https://*.facebook.com/*
// @grant none
// ==/UserScript==
@malles
malles / bix_upload_uikit.js
Last active November 3, 2015 13:29
Implementation of UIkit uploader
/* *
* Bixie Printshop
* bix_upload_uikit.js
* Created on 21-12-2014 00:58
*
* @author Matthijs
* @copyright Copyright (C)2014 Bixie.nl
*
*/
@malles
malles / bixorder.php
Last active January 2, 2016 04:59
calc inkoop
<?php
public function calculateInkoop () {
//inkoop berekenen
$calcParams = array('calcType'=>'inkoop');
$bixCalc = BixTools::getCalcClass($this,$calcParams);
$inkoopPrijsInfo = $bixCalc->calcInkoop();
if (!$inkoopPrijsInfo) {
return $this->setError($bixCalc->getError());
}
$aFinancieel = $this->get('financieel',array());
@malles
malles / cli
Created January 4, 2014 11:44
Een Git Repository creëren via de Command Line
~$ mkdir projectname
~$ cd projectname
~$ git init
~$ touch file1
~$ git add file1
~$ git commit -m 'first commit'
~$ git remote add origin git@github.com:USER/REPO.git
~$ git push origin master
@malles
malles / csv-import CRM.php
Last active January 4, 2016 00:29
Bewerking adres en genereren willekeurige code.
<?php
//read and convert CSV data
$file = 'Postmailing.csv';
$dataRows = array();
$del = ';';
echo '<pre>';
$csv = implode(';',adres::$csvFields)."\n";
if (($handle = fopen($file, "r")) !== FALSE) {
$i=0;
while ( ($data = fgetcsv($handle, 10000, $del) ) !== FALSE ) {
@malles
malles / output.txt
Created January 16, 2016 13:22
Vagrant up output
vagrant up
Bringing machine 'local' up with 'virtualbox' provider...
==> local: Importing base box 'puphpet/ubuntu1404-x64'...
==> local: Matching MAC address for NAT networking...
==> local: Checking if box 'puphpet/ubuntu1404-x64' is up to date...
==> local: Setting the name of the VM: YOO-develop_local_1452949267092_45295
==> local: Clearing any previously set network interfaces...
==> local: Preparing network interfaces based on configuration...
local: Adapter 1: nat
local: Adapter 2: hostonly