Notice: Undefined index: empresa in C:\xampp\htdocs\WAKOLIMA\Receiving\getRecsWIF.php on line 7

Notice: Undefined index: bodega in C:\xampp\htdocs\WAKOLIMA\Receiving\getRecsWIF.php on line 8

Notice: Undefined index: art in C:\xampp\htdocs\WAKOLIMA\Receiving\getRecsWIF.php on line 9
Error in executing query. SELECT TOP 200 TRANSREFID FROM INVENTTRANS wms INNER JOIN InventDim id ON wms.InventDimid = id.InventDimid AND wms.dataareaid = id.dataareaid WHERE wms.DATAAREAID = AND wms.TRANSTYPE = '3' AND id.INVENTLOCATIONID = AND wms.ITEMID = '' GROUP BY wms.TRANSREFID ORDER BY wms.TRANSREFID DESC
Array ( [0] => Array ( [0] => 42000 [SQLSTATE] => 42000 [1] => 156 [code] => 156 [2] => [Microsoft][SQL Server Native Client 11.0][SQL Server]Incorrect syntax near the keyword 'AND'. [message] => [Microsoft][SQL Server Native Client 11.0][SQL Server]Incorrect syntax near the keyword 'AND'. ) )