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

How to make URL loads only on login
On my page, when a user login he's redirects to user_home.php. I made it also to open the chat scree

Displaying Site Logo/Icon on a Title tag
really need some help out here. I want to insert a Logo/Icon just like the one close to the "PH

filesize() returns 0
I have a socket program that runs in an infinite loop, listening for connections, in this socket I h

Save User Inputs while javascript reloading!
hi..
i have written a PHP code in which i reload the page when user selects a value in dropdown..

How to extract/download content from HTTPS page?
Hello to all the Members of this forum, Im Shoiab, A novice programmer in php.. for my first job I h

The type or namespace name 'ServiceModel' does not exist in the namespace 'System'
When I locally run the website, it works just fine, but when I uploaded it to the hosting environmen

Inserting a variable in a link
I have this code that I want to insert for my own variable but I have no idea how. This is what I wa

Socket Server Response Headers
Earlier I had a post about my Socket Server, I wasn't able to get it to connect, now I can

I

php file erros / need help please
Hello

Someone decoded a zend file for me.. after uploaded it on ftp i get some errors, i trye

Problem with coding MySQL query
I'm having heaps of trouble getting one of my PHP/MySQL queries to work for some reason (and the fun

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