Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include('config2.php');
- $query = sprintf("SELECT * FROM billingdates");
- $result = mysql_query($query);
- echo "Date Range: <br /><br />";
- while($row2 = mysql_fetch_array($result))
- {
- $storedatestart++ = $row['start'];
- $storedatefinish++ = $row['finish'];
- }
- $db = pg_connect('host= dbname= user= password=');
- $query2 = sprintf("SELECT COUNT(inbound) AS totalcountcalls FROM call_stats WHERE inbound = 1 AND dura_released = null AND mainbox= ' " . $_SESSION['SESS_DID'] . "' AND time_start between '" . $storedatestart++ . " ' AND '" . $storedatefinish++ . " '");
- $result2 = pg_query($query2);
- if (!$result2) {
- echo "Problem with query " . $query2 . "<br/>";
- echo pg_last_error();
- exit();
- }
- while($row3 = pg_fetch_array($result2))
- {
- $queryresultcountrows++ = $totalcountcalls;
- }
- while($row = mysql_fetch_array($result))
- {
- echo "<form onSubmit='return validateForm()' name='frmRequest' action='report.php' method='post' encytype='multipart/form-data'>";
- echo "<input name='start' type='text' class=\"textfield2\" value='" . $row['start'] . "'readonly /> To: <input value='" . $row['finished'] . "' name='finished' class=\"textfield2\" readonly /> <input type='submit' class='submit' value='Submit' /></form> " . $queryresultcountrows++ . "";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement