Stumped I Tell You!



$getEnd = "select a.ACCOUNTID as CONTRACT, a.BALANCE/10000 as BALANCE,
b.STATUS, b.IMSI_ID as MDN, b.IMEI_ID as ESN, ";
$getEnd .= "b.EQUIP_ID as MIN, b.MKT, b.MARKET_NAME ";
$getEnd .= "FROM work.account_".$startDate." a ";
$getEnd .= "JOIN work.customer_".$startDate." b ";
$getEnd .= "ON ( b.CONTRACT_ID = a.ACCOUNTID AND b.RUNDATE =
date_sub(a.BC_ACCOUNT_ARC_DATE, interval 1 day)) ";
$getEnd .= "WHERE a.BC_ACCOUNT_ARC_DATE =
str_to_date('".$endDate."','%Y%m%d') ";
$getEnd .= "AND a.ACCOUNTID = '".$acct['CONTRACT']."' ";
$getEnd .= "AND a.status = 1 ";
$getEnd .= "AND a.balance > 0 ";
if(!$dbEnd = (mysql_query($getEnd, $dbc))){
echo mysql_error() . "\n";
exit();
}
echo $getEnd;

returns....

select a.ACCOUNTID as CONTRACT, a.BALANCE/10000 as BALANCE, b.STATUS,
b.IMSI_ID as MDN, b.IMEI_ID as ESN, b.EQUIP_ID as MIN, b.MKT,
b.MARKET_NAME FROM work.account_20080601 a JOIN work.customer_20080601 b

ON ( b.CONTRACT_ID = a.ACCOUNTID AND b.RUNDATE =
date_sub(a.BC_ACCOUNT_ARC_DATE, interval 1 day))
WHERE a.BC_ACCOUNT_ARC_DATE = str_to_date('20080602','%Y%m%d')
AND a.ACCOUNTID = '1000080'
AND a.status = 1
AND a.balance > 0

....which works from the command line.

$endBal = mysql_fetch_array($dbEnd);
echo mysql_num_rows($dbEnd);
print_r($endBal);

Nothing gets returned from those last statements. Am I missing something
completely?
.



Relevant Pages

  • Re: Value greater than value issue
    ... checking to see if a user's withdraw request is greater than their ... echo "Insufficient funds."; ... thus shows "Insufficient funds." ... Repeat for the available balance. ...
    (comp.lang.php)
  • Re: cgroup, balance RT bandwidth
    ... It should split the RT balance domain just the same. ... The available bandwidth is related to the number of cpus in the balance ... echo 1> cpuset.sched_load_balance ... When I run 2 tests on cgroup/3, it only uses bandwidth from cpu 3 ...
    (Linux-Kernel)
  • cgroup, RT cpu balance question
    ... I have one question regarding RT cpu balance using cgroup. ... echo 1> cpuset.sched_load_balance ... I have a small test that uses a loop to utilize 100% cpu. ...
    (Linux-Kernel)
  • Re: [PATCH 05/13] mm: balance zone aging in kswapd reclaim path
    ... The balance is not good enough for now, but is expected to improve much when ... active/inactive size ratios: ... echo active/inactive size ratios: ...
    (Linux-Kernel)