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

sapgui f4 help last search
I know this has to be simople. One user (maybe more) does not have the "last search saved" from the

Save username into DB
OkaY so I got my blog to actually save the posts and whatever, all I need now is for it to keep the

form variables from database help.
Hi all,

I would like to have a form that gives you options based on the results of an mysql q

Variables and Include
Code: [Select]<?php

$header = $_COOKIE['mss']['header'];
$body = $_COOKIE['mss']['b

Linkage between two scripts
Okay say I have this for a link in a script:

Code: <li><a href="#&q

Custom array sort? asc then desc
Any ideas how I could sort this array? I've been trying for a while. Maybe with usort, but I have no

Grabbing Values From an Array for Posting
I have a grid array that I am using with a form that when it hits the currently named test.php it lo

Quick Question about echo value
Hey guys, I'm trying to get something to show differently in one of my scripts. I'm trying to make

mysql query with single quotes in a variable
$sitedetails = "INSERT INTO vars (address, sitename, description, ownername, theme) VALUES ('$u

How to use Substr
I want to check for the word CATEGORY: inside a string which can be CATEGORY: ITEM
and remove the

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