[smoothoperator] r4198 committed - Try to see if we can just use one query

0 views
Skip to first unread message

smootho...@googlecode.com

unread,
Apr 15, 2013, 2:59:55 PM4/15/13
to smootho...@googlegroups.com
Revision: 4198
Author: ma...@venturevoip.com
Date: Mon Apr 15 11:59:43 2013
Log: Try to see if we can just use one query
http://code.google.com/p/smoothoperator/source/detail?r=4198

Modified:
/SmoothOperatorCRM/script_results.php

=======================================
--- /SmoothOperatorCRM/script_results.php Mon Apr 15 11:57:30 2013
+++ /SmoothOperatorCRM/script_results.php Mon Apr 15 11:59:43 2013
@@ -106,7 +106,7 @@
<a
href="script_results.php?search=1&job=<?=$_POST['job']?>&from_date=<?=$_POST['from_date']?>&to_date=<?=$_POST['to_date']?>&download=1&<?=$disps?>">Download
Full List</a><br /><br />
<?
}
- if (isset($_GET['show_lead'])) {
+ if (0&&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.*,
job_dispositions.text as disposition_text, customers.*, users.username,
users.id, customers.id as customer_id, script_entries.type 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 and job_dispositions.id in (".$dispositions.")";
Reply all
Reply to author
Forward
0 new messages