Am i doing this wrong?


Posted on 16th Feb 2014 07:03 pm by admin

Im pulling from an Oracle database some info... one of which is a field count_pnums which is a NUMBER type field.
Code: <?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!

No comments posted yet

Your Answer:

Login to answer
281 Like 18 Dislike
Previous forums Next forums
Other forums

Fatal error: Call to a member function fetchrow() on a non-object in C:xamppht
okay i have this query and everytime i add `item_id`=? to it... it gives me the error in the title..

upgrade from 4.7 to ECC 6.0
Hi all,
we are going to do an upgrade from R/3 4.7 to ECC 6.0. I need to know if i can find som

Multiple Dropdown Selections
I have a form that let's a user insert a page with the ability to select categories. I want them to

Forms Authentication and Refresh at Login page
Hello, When I try to press the Login button in my webapplication at my login.aspx page nothing h

str_replace help
Hey there,

I'm a PHP newb, I'm having troubles with the str_replace function. I want to clean

A href problem under php
Hello...

I tried to explain the issue in an earlier post.. but was not clear enough....

Check if another session of the page is running?
I want to keep people from opening multiple tabs, or sessions of my Facebook app. Is it possible to

How to sum these output values
Hi

I need sum the month totals
SELECT region_name, area_name ,SUM (CASE WHEN S

Multiple includes losing variables
Hey all,

just starting out w php and ran into a problem pretty quickly. I'm
including seve

please hep to get values from a table row
can anyone tel me how I can select and get data from one row by pressing an Edit button in that row

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash