Revision: 4193
Author:
ma...@venturevoip.com
Date: Mon Apr 15 11:10:08 2013
Log: Add in dispositions
http://code.google.com/p/smoothoperator/source/detail?r=4193
Modified:
/SmoothOperatorCRM/script_results.php
=======================================
--- /SmoothOperatorCRM/script_results.php Wed Apr 10 07:37:33 2013
+++ /SmoothOperatorCRM/script_results.php Mon Apr 15 11:10:08 2013
@@ -70,7 +70,7 @@
if (isset($_GET['show_lead'])) {
$sql = "SELECT script_entries.statement, script_results.*,
customers.*, users.username,
users.id,
customers.id as customer_id,
script_entries.type FROM script_entries, script_results, customers, users
where date(question_datetime) between ".sanitize($_POST['from_date'])."
and ".sanitize($_POST['to_date'])." and script_results.job_id
= ".sanitize($_POST['job'])." and script_results.customer_id =
customers.id
and script_results.user_id =
users.id and script_entries.script_id =
script_results.script_id and script_entries.order =
script_results.question_number and
customers.id
= ".sanitize($_GET['customer_id']);
} else {
- $sql = "SELECT script_entries.statement, script_results.*,
customers.*, users.username,
users.id,
customers.id as customer_id,
script_entries.type FROM script_entries, script_results, customers, users
where date(question_datetime) between ".sanitize($_POST['from_date'])."
and ".sanitize($_POST['to_date'])." and script_results.job_id
= ".sanitize($_POST['job'])." and script_results.customer_id =
customers.id
and script_results.user_id =
users.id and script_entries.script_id =
script_results.script_id and script_entries.order =
script_results.question_number";
+ $sql = "SELECT script_entries.statement, script_results.*,
customers.*, users.username,
users.id,
customers.id as customer_id,
script_entries.type, job_dispositions.text FROM script_entries,
script_results, customers, users, customer_dispositions, job_dispositions
where date(question_datetime) between ".sanitize($_POST['from_date'])."
and ".sanitize($_POST['to_date'])." and script_results.job_id
= ".sanitize($_POST['job'])." and script_results.customer_id =
customers.id
and script_results.user_id =
users.id and script_entries.script_id =
script_results.script_id and script_entries.order =
script_results.question_number and
customer_dispositions.`customer_id`=
customers.id and
job_dispositions.id =
disposition";
}
$result = mysqli_query($connection, $sql) or
die(mysqli_error($connection));
//echo $sql;