iPixel Posted November 10, 2009 Share Posted November 10, 2009 Im pulling from an Oracle database some info... one of which is a field count_pnums which is a NUMBER type field. <?php $sql_E = "SELECT count_pnums, dist_pnums FROM pcsmgr.mvx_phone_history_io WHERE calldate BETWEEN '$tapit_sDate' AND '$tapit_eDate' AND extension = '$mvx_ext' AND calltype = '$calltype' AND callcat = '$callcat'"; $go_E = oci_parse($conn, $sql_E); oci_execute($go_E); $all_count = ""; $unq_count = ""; while($row_E = oci_fetch_assoc($go_E)) { $all_count += $row_E['COUNT_PNUMS']; $unq_count += $row_E['DIST_PNUMS']; } if($unique == "All") // ECHO COUNTED PHONE CALLS { echo $all_count; } if($unique == "Unique") // ECHO DISTINCT PHONE CALLS { echo $unq_count; } ?> Any idea why my echo $all_count or echo $unq_count dont echo anything? I'm sure all the variables used in the query contain the correct info. I dont know if my query is failing or if my $all_count+=$row_E.... isnt working. Thanks! Link to comment https://forums.phpfreaks.com/topic/180984-am-i-doing-this-wrong/ Share on other sites More sharing options...
otuatail Posted November 10, 2009 Share Posted November 10, 2009 Is $tapit_sDate' AND '$tapit_eDate in the format 'YYYY-MM-DD' ? Link to comment https://forums.phpfreaks.com/topic/180984-am-i-doing-this-wrong/#findComment-954890 Share on other sites More sharing options...
iPixel Posted November 10, 2009 Author Share Posted November 10, 2009 it is in 09-NOV-09 format which is the way it's stored inside the database. I use a the same query in another area and that one works fine as far as data pull is concerned. This one is just being used differently and it's giving me beef! Link to comment https://forums.phpfreaks.com/topic/180984-am-i-doing-this-wrong/#findComment-954895 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.