I am running a script that does MANY things but I am trying to get a Pervasive statement to work in my php that works in the DB that I am querying. I have tried all my tricks, but have had no success with getting this to work in the table that this is supposed to be displayed in.
$pom = $dbx->getOne('SELECT (SELECT SUM(wrt_sls) FROM wrt
WHERE wrt_cat = \'POM\'
AND wrt_cng_dat_4 >= '.$start.'
AND wrt_cng_dat_4 <= '.$end.'
AND wrt_pft_ctr in '.$pcs.') +
(SELECT SUM(wrt_sls) FROM wrt
WHERE wrt_cat in (\'BED\',\'MP\')
AND wrt_vend_id = \'PROTECTABED\'
AND wrt_cng_dat_4 >= '.$start.'
AND wrt_cng_dat_4 <= '.$end.'
AND wrt_pft_ctr in '.$pcs);
Again, I get the right result in Pervasive but am getting nothing in the actual application. Any tips?