Click here to Skip to main content
15,123,880 members
Home / Discussions / Database
   

Database

 
QuestionInsert dynamic SQL Values into Temp Table Pin
indian14326-Apr-18 8:03
Memberindian14326-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
Memberindian14326-Apr-18 11:09 
Questionmysql query Pin
Member 1360728325-Apr-18 17:47
MemberMember 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
MemberMember 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
Memberbfg9000d36025-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
Memberbfg9000d36025-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
Memberbfg9000d36025-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
Memberbfg9000d36025-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
Memberbfg9000d36025-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
Memberbfg9000d36026-Apr-18 2:17 
QuestionCopying the Headers of Result Set of Select statement Pin
indian14324-Apr-18 10:05
Memberindian14324-Apr-18 10:05 
AnswerRe: Copying the Headers of Result Set of Select statement Pin
JChrisCompton24-Apr-18 12:42
MemberJChrisCompton24-Apr-18 12:42 
AnswerRe: Copying the Headers of Result Set of Select statement Pin
Mycroft Holmes24-Apr-18 13:53
professionalMycroft Holmes24-Apr-18 13:53 
GeneralRe: Copying the Headers of Result Set of Select statement Pin
indian14324-Apr-18 15:09
Memberindian14324-Apr-18 15:09 
GeneralRe: Copying the Headers of Result Set of Select statement Pin
Mycroft Holmes24-Apr-18 15:32
professionalMycroft Holmes24-Apr-18 15:32 
GeneralRe: Copying the Headers of Result Set of Select statement Pin
indian14325-Apr-18 10:48
Memberindian14325-Apr-18 10:48 

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.