Skip to content

Instantly share code, notes, and snippets.

@FabricioYwin
FabricioYwin / banco-material.php
Created December 20, 2016 16:44
Como acionar insert somente quando clicar no botão (maozinha).
<?php
function listaMatHistOS($conn, $rm){
$HistMatOS = array();
$where = [];
$where[] = "cliente.id = (select usuario.idCliente from usuario where usuario.login = '".usuarioLogado()."')";
//$where[] = "EXISTS(SELECT usuario.id FROM usuario WHERE usuario.login = '".usuarioLogado()."' AND (cliente.id = usuario.idCliente OR usuario.funcionarioMatriz = 1))";
if ($rm) {
$where[] = "itemMaterial.rm = '{$rm}'";