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 set pass login name from htaccess to php
When the user logs into my members page via htaccess, I'd like to retain the username so that I can

trim function issues
Hi guys, total noob here...

So I've been tinkering around with a html and am using php to em

Async WSAConnect failed on XP with error code = 2 ("File not found")
Hi all,

I have very strange bug, please help me if you can.

It is reproduced o

INSERT data problem!
After having an string with apostrophes ', double quotes " or any other special characters, suc

losing variables between php brackets
Hi

have got this code:
Code: $id=mysql_result($result,0,"itemid");
$title=mys

PHP code needed to get/post form fields and request mysql query results.
I'm new to PHP

I've created an html form to allow the user to request a basic telephone dire

Problem with variable declaration in switch statement
Hello, I am having some trouble assigning a value to a variable inside a switch statement. What I a

Any help with my email script?
I have an email script, I have not tested it, although someone tested it for me and said it worked f

SESSION CHECK WORKS "MOST" of the time... whats going on?
i have a sign in check thats included in every page that is a members only page which is basically a

Is there a function ... auto send IP
Is there some function that can be sent to a ddns service that returns the ip address of a ddns forw

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