Click here to Skip to main content
15,559,567 members
Home / Discussions / Database
   

Database

 
QuestionSQL 2016 Optimization ... Pin
Member 138060854-May-18 2:10
Member 138060854-May-18 2:10 
RantRe: SQL 2016 Optimization ... Pin
CHill604-May-18 2:13
mveCHill604-May-18 2:13 
AnswerRe: SQL 2016 Optimization ... Pin
Eddy Vluggen5-May-18 2:14
professionalEddy Vluggen5-May-18 2:14 
QuestionSQL 2016 Optimization ... Pin
Member 138060854-May-18 2:10
Member 138060854-May-18 2:10 
QuestionHow to stop execution of other tasks in SSIS if a script task gets Dts.TaskResult = (int)ScriptResults.Failure; Pin
indian1432-May-18 15:12
indian1432-May-18 15:12 
AnswerSelf answered just if somebody has similar problem it would be helpful. How to stop execution of other tasks in SSIS if a script task gets Dts.TaskResult = (int)ScriptResults.Failure; Pin
indian1433-May-18 9:41
indian1433-May-18 9:41 
QuestionInsert dynamic SQL Values into Temp Table Pin
indian14326-Apr-18 8:03
indian14326-Apr-18 8:03 
AnswerRe: Insert dynamic SQL Values into Temp Table Pin
Richard Deeming26-Apr-18 9:00
mveRichard Deeming26-Apr-18 9:00 
GeneralRe: Insert dynamic SQL Values into Temp Table Pin
indian14326-Apr-18 11:09
indian14326-Apr-18 11:09 
Questionmysql query Pin
Member 1360728325-Apr-18 17:47
Member 1360728325-Apr-18 17:47 
AnswerRe: mysql query Pin
Jörgen Andersson25-Apr-18 22:48
professionalJörgen Andersson25-Apr-18 22:48 
GeneralRe: mysql query Pin
Member 1360728326-Apr-18 11:56
Member 1360728326-Apr-18 11:56 
GeneralRe: mysql query Pin
Jörgen Andersson26-Apr-18 22:22
professionalJörgen Andersson26-Apr-18 22:22 
QuestionShipping tracking Link output to google search from MYSQL Database Pin
bfg9000d36025-Apr-18 5:51
bfg9000d36025-Apr-18 5:51 
This line
$output = "Tracking Number: $tracking_number<br />Order Number: $sales_order_number<br />Parts: $parts";

I need whatever $tracking_number outputs to become a hyperlink for google search with the outputted number search.

Example

The database outputs

Tracking Number: 923489234 <=This number needs to be a blue hyperlink link to google search with that number search
Order Number: 234324
Parts: 30405324

Once that tracking number is search in google, google determines what carrier it is saves me allot of trouble. I wish it was this simple $output = "Tracking Number: $tracking_number link  google.com/search?q=$tracking_number any ideas guys. Thanks


The rest of my code is below if you want to view it.

<?php
$output = NULL;

if(isset($_POST['submit'])){
     //Connect to the database
      $mysqli = NEW  MySQLi("","","","");

 $search = $mysqli->real_escape_string($_POST['search']);

 //Query the database
  $resultSet = $mysqli->query("SELECT * FROM invlist WHERE sales_order_number = '$search'");

  if($resultSet->num_rows > 0){
      while($rows = $resultSet->fetch_assoc())
      {
           $tracking_number = $rows['tracking_number'];
           $sales_order_number = $rows['sales_order_number'];
           $parts = $rows['parts'];

           $output = "Tracking Number: $tracking_number<br />Order Number: $sales_order_number<br />Parts: $parts";
      }
  }else{
      $output = "No results";
  }
}
?>


<form method="POST">
<input type="TEXT"  name="search" />
<input type="SUBMIT" name="submit" value="Search" />
</form>

<?php echo $output; ?>

AnswerRe: Shipping tracking Link output to google search from MYSQL Database Pin
Eddy Vluggen25-Apr-18 6:37
professionalEddy Vluggen25-Apr-18 6:37 
GeneralRe: Shipping tracking Link output to google search from MYSQL Database Pin
bfg9000d36025-Apr-18 8:19
bfg9000d36025-Apr-18 8:19 
GeneralRe: Shipping tracking Link output to google search from MYSQL Database Pin
Eddy Vluggen25-Apr-18 9:19
professionalEddy Vluggen25-Apr-18 9:19 
GeneralRe: Shipping tracking Link output to google search from MYSQL Database Pin
bfg9000d36025-Apr-18 9:31
bfg9000d36025-Apr-18 9:31 
GeneralRe: Shipping tracking Link output to google search from MYSQL Database Pin
Eddy Vluggen25-Apr-18 9:38
professionalEddy Vluggen25-Apr-18 9:38 
GeneralRe: Shipping tracking Link output to google search from MYSQL Database Pin
Richard Deeming25-Apr-18 10:46
mveRichard Deeming25-Apr-18 10:46 
GeneralRe: Shipping tracking Link output to google search from MYSQL Database Pin
bfg9000d36025-Apr-18 10:50
bfg9000d36025-Apr-18 10:50 
GeneralRe: Shipping tracking Link output to google search from MYSQL Database Pin
Richard Deeming25-Apr-18 11:08
mveRichard Deeming25-Apr-18 11:08 
GeneralRe: Shipping tracking Link output to google search from MYSQL Database Pin
bfg9000d36025-Apr-18 11:12
bfg9000d36025-Apr-18 11:12 
GeneralRe: Shipping tracking Link output to google search from MYSQL Database Pin
Richard Deeming25-Apr-18 11:16
mveRichard Deeming25-Apr-18 11:16 
GeneralRe: Shipping tracking Link output to google search from MYSQL Database Pin
bfg9000d36026-Apr-18 2:17
bfg9000d36026-Apr-18 2:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.