Jump to content

dinoslikeroar

Members
  • Posts

    14
  • Joined

  • Last visited

dinoslikeroar's Achievements

Member

Member (2/5)

0

Reputation

  1. How can I go about adding an Include option to the following code? Elseif statement if it matches include option display the include date. Need to add or include after the admindateinsteadexclude option if (preg_match("/AdminDateExclude/", $option) || preg_match("/AdminDateInsteadExclude/", $option) { $string_temp = substr($option, strpos($option, 'AdminDate')); $string_temp = substr($string_temp, 0, strpos($string_temp, ',')); $ids = explode('.', $string_temp); array_shift($ids); $ids_list = implode(', ', $ids); $exclude_admin = " AND id NOT IN(".$ids_list.") "; } else { $exclude_admin = ""; }
  2. I'm stuck on getting the below code to work for a project I'm working on. Not sure if this is in the right location or not and if it isn't I apologize. I'm needing a yes/no option. If yes it will display certain options from them to choose from (NaYes) and if no is select it should display the campus options (NaNo). <form name="CoharieTribe"> <select id="coharietribe" id="second" class="package" title="Search in"size="1"> <option selected="selected">Are you a member or affiliated with the Coharie Tribe?</option> <option class="dropdown" value="yes">Yes</option> <option class="dropdown" value="no">No</option> </select> </form> <!-- Yes Option --> <form name="NaYes"> <select id="yes" class="searchSelect" title="Search in"size="1" onChange="goNaYes()"> <option selected="selected">Select Option</option> <option value="www.placeyourorderhere.com">I am a new student placing an order for the first time</option> <option value="www.placeyourorderhere.com">I am a returning student</option> <option value="www.placeyourorderhere.com">I need to renew my background check</option> <option value="www.placeyourorderhere.com">I need a drug test</option> </select> </form> <!-- No Option --> <form name="NaNo"> <select id="nurse" id="second" class="package" title="Search in"size="1"> <option selected="selected">Please select your campus:</option> <option class="dropdown" value="UNC">University of North Carolina</option> <option class="dropdown" value="UVA">University of Virginia</option> <option class="dropdown" value="CO">colorado University</option> </select> </form>
  3. There will be a list of six groups that need to see this. The file is .html but has php and is config to run. Would it be something like this? If I need it to display above the Heading info
  4. This below is what's being used to pull that information.
  5. How can I go about adding a verbiage to a landing page to display for a certain group? Landing page is index.html. Need to do a php call. Not sure what other information I need to provide to get help. tia.
  6. I need to test the following code, but don't want to host it on the server. How can I go about doing so and determine if the code is working or not? I need for the entry instructions to display outside of the input box. tia. $attr_input = "<input type='text' id='attribute_$tracker_alert_attribute_id' name='attribute_$tracker_alert_attribute_id' ". "value='$value' $trigger_on_change_html> $entry_instructions"; } else { $attr_input = "<input type='text' name='attribute_$tracker_alert_attribute_id' value='$value' size='10'> $entry_instructions"; } $form_content .= "\n<span><td>$attr_label</td><td>$attr_input $entry_instructions</td></span>\n"; $attribute_table .= "<tr><td>$attr_label</td><td></td><td>$attr_input</td></tr>"; $form_content .= "\n<tr><td>$attr_label</td><td>$attr_input</td></tr>\n";
  7. I am trying to figure out how to get the instructions to display next to the input box. Right now the text is displaying within the text box and is being cut off. The placeholder='$entry_instructions' is the information that needs to be moved to a <p> tag next to the input box. $attr_input = "<input type='text' id='attribute_$tracker_alert_attribute_id' name='attribute_$tracker_alert_attribute_id' ". "value='$value' placeholder='$entry_instructions' $trigger_on_change_html>"; } else { $attr_input = "<input type='text' name='attribute_$tracker_alert_attribute_id' placeholder='$entry_instructions' value='$value' size='10'>"; }
  8. The below is the lines above the $csvLine = array() information while ($orderInfo = mysql_fetch_assoc($test_sth)) { if ($options->debug) $progressLength = print_progress(++$count, $numRows, $scriptStartTime, $progressLength); while ($orderInfo = mysql_fetch_assoc($testout_sth)) { if ($options->debug) $progressLength = print_progress(++$count, $numRows, $scriptStartTime, $progressLength); } } I'm needing the information to display the data into those columns in my csv file.
  9. I'm still new to this coding and I am trying to figure out what I'm supposed to use in the area for $csvLine = array(). Example below: What I'm not sure is what information do I put in the $csvLine = array( 'SAMPLE1 ITEMS RECEIVED' => $orderInfo['NOT SURE WHAT TO PUT HERE'], ) to pull the data Below is some of the code: ----- $test_sql = "SELECT DISTINCT order_or_item_number as item_number, location, search_type ". "FROM order_history ". "LEFT JOIN research_queue on order_or_item_number = item_number ". "WHERE (order_history.modified_date BETWEEN ??? AND ???) ". "AND action LIKE '%SENT TO REVIEW'"; $start_date = '2016-07-20 00:00:00'; $end_date = '2016-07-20 23:59:59'; $test_sth = DBHelper::execute($test_sql, 'test_twin', $start_date, $end_date); $items_submitted = array(); $test_out_sql = "SELECT DISTINCT order_or_item_number as item_number, location, search_type ". "FROM order_history ". "LEFT JOIN research_queue on order_or_item_number = item_number ". "WHERE (order_history.modified_date BETWEEN ??? AND ???) ". "AND action LIKE '%COMPLETED FROM REVIEW'"; $test_out_sth = DBHelper::execute($test_out_sql, 'test_twin', $start_date, $end_date); $items_completed = array(); while($result=mysql_fetch_assoc($test_sth)) { $items_submitted[] = $result; } while($result=mysql_fetch_assoc($test_out_sth)) { $items_completed[] = $result; } // Begin main while loop $sample1_received = array(); $sample2_received = array(); $sample1_completed = array(); $sample2_completed = array(); foreach($items_submitted as $item){ $psn = substr($item['item_number'], 2, 4); switch ($psn) { case '1234': case '0123': $sample1_received[] = $item['item_number']; break; case '1232': case '5659': $sample2_received[] = $item['item_number']; break; } } foreach($items_completed as $item){ $psn = substr($item['item_number'], 2, 4); switch($psn) { case '1234': case '0123': $sample1_completed[] = $item['item_number']; break; case '1232': case '5659': $sample2_completed[] = $item['item_number']; break; } } $csvLine = array( 'DATE' => $orderInfo[''], 'SAMPLE1 ITEMS RECEIVED' => $orderInfo[''], 'SAMPLE1 ITEMS COMPLETED' => $orderInfo[''], 'SAMPLE2 ITEMS RECEIVED' => $orderInfo[''], 'SAMPLE2 ITEMS COMPLETED' => $orderInfo[''], ); $csvLine = array_map('clean', $csvLine); $report->writeLine($csvLine); $rowsWritten++; // End main while loop
  10. I'm getting the following error 'Because Column 'modified_date' in where clause is ambiguous' when trying to run a report with a MySQL script it in. PHP Fatal error: Uncaught exception 'Exception' with message 'Error on query SELECT DISTINCT order_or_item_number as item_number, location, search_type FROM order_history LEFT JOIN research_queue on order_or_item_number = item_number WHERE (modified_date BETWEEN '2016-07-26 00:00:00' AND '2016-07-26 23:59:59') AND action LIKE '%SENT TO REVIEW' Because: Column 'modified_date' in where clause is ambiguous from file /home/samplereport.php test_sql = "SELECT DISTINCT order_or_item_number as item_number, location, search_type ". "FROM order_history ". "LEFT JOIN research_queue on order_or_item_number = item_number ". "WHERE (modified_date BETWEEN ??? AND ???) ". "AND action LIKE '%SENT TO REVIEW'"; I'm not sure what other information is needed.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.