Question

In: Computer Science

i used this coding for select image from database but the image did not retrieve from...

i used this coding for select image from database but the image did not retrieve from database and did not display  

what is the issue ?

include "connect.php";
                               $sql= "select fileTmpPath from picture where ID='3'";
                                   $result = mysqli_query($conn,$sql);
                                   $pic= mysqli_fetch_array($result);
                                  
echo " <img src=" .$pic["fileTmpPath"]."' />";
                                   ?>

Solutions

Expert Solution

Dear Student ,

As per requirement submitted above kindly find below solution.

Here new web page with name "picture.php" is created which contains below code.

NOTE :IMAGES AND FILE PICTURE.PHP IS PLACED IN THE SAME LOCATION IN THE SERVER.

Table :

*****************************

picture.php :

<?php

include "connect.php";//INCLUDE FILE TO CONNECT TO DATABASE

$sql= "select fileTmpPath from picture where ID='3'";//sql query

    $result = mysqli_query($conn,$sql);//execute query

    $pic= mysqli_fetch_array($result);//fetch the result

   //show image

echo " <img src=" .$pic["fileTmpPath"]." />";

?>

==================================

Output :Open web page picture.php in the browser and will get the screen as shown below.

Screen 1:

NOTE :PLEASE FEEL FREE TO PROVIDE FEEDBACK ABOUT THE SOLUTION.


Related Solutions

Select all of the following that are used to predict protein coding genes from a genome...
Select all of the following that are used to predict protein coding genes from a genome sequence ORF detection cDNA Codon Bias BLAST searches to identify similar DNA or protein sequences Unique DNA sequences are harder to assemble when creating a whole genome sequence than repetitive DNA sequences True False
Use the following information to create SQL commands to retrieve data from Henry Books database :...
Use the following information to create SQL commands to retrieve data from Henry Books database : For each book, list the book code, book title, publisher code, and publisher name. Order the results by publisher name. For each book published by Plume, list the book code, book title, and price. List the book title, book code, and price of each book published by Plume that has a book price of at least $14. List the book code, book title, and...
Draw a landscape image using python coding.
Draw a landscape image using python coding.
Question 1: In the NCBI database, retrieve the nucleotide sequences NG011676. Report: Gene name, database name....
Question 1: In the NCBI database, retrieve the nucleotide sequences NG011676. Report: Gene name, database name. Number of exons and its position (the start and the end of each exon). The start and the end of coding region (CDS) Accession number of protein from this gene and the length of polypeptide. Question 2: Use NG011676 to run GenScan. Report the results and compare the results with information of this gene from Question 1. Question 3: Use NG011676 to run FGENESH...
In the MATLAB environment, display an image of a breast mammogram from the MAMMO database. Apply...
In the MATLAB environment, display an image of a breast mammogram from the MAMMO database. Apply gray-level scaling, histogram equalization, and an LOG enhancement mask for image enhancement as given below. Compare the enhanced images to original image qualitatively. LOG enhancement mask to be convolved with the image: - 1 -1 -1 - 1 9 - 1 -1 -1 -1 MAMMO database: http://peipa.essex.ac.uk/pix/mias/
First, select a publicly held company. Retrieve their annual financial statements either from their website or...
First, select a publicly held company. Retrieve their annual financial statements either from their website or from the SEC EDGAR Company Filings. Note: do a search for "Option" and make sure the selected company uses option contracts. What is the company you have selected? What is the company using their option contract for? What is the value of the option contract in the Annual Statements? Copy/paste a picture of the value from the financial statements. Imagine you are a retiree...
coding the following project: Setting up structures to store and retrieve data. A major requirement of...
coding the following project: Setting up structures to store and retrieve data. A major requirement of virtually all projects in the financial world involves the storage and retrieval of data. project must be properly modularized and allow for more than one way to store the data to satisfy the various needs of clients.The first manner is by storing data using hashtables (or hash maps) as the basis of storing and retrieving data.
Using the HotelDB tables, provide the following result as a screen image. WRITE SQL to retrieve...
Using the HotelDB tables, provide the following result as a screen image. WRITE SQL to retrieve rows from any hotel with Family room types and price less than $150. use hoteldb; CREATE TABLE HOTEL ( hotelNo numeric primary key , name varchar(40) , address varchar(40) , city varchar(200) ); CREATE TABLE ROOM ( roomNo numeric Primary Key , hotelNo numeric References HOTEL , type varchar(20) , price dec(9,2) ); CREATE TABLE GUEST ( guestNo numeric primary key , name varchar(40)...
Note I did not post the city jail database because it was too long and it...
Note I did not post the city jail database because it was too long and it couldnt let me post, however, there was another question answered with the same database right here, so please use that. It is exactly the same. If not let me know how i can post the database subqueries) Your files must be in sql script format so that they can be run in SQL Developer. Using the City Jail database to answer the questions. Use...
Subject DataBase/MySQL What is wrong with this statement? SELECT vendor_id, (SELECT vendor_name FROM vendors), avg(invoice_total) FROM...
Subject DataBase/MySQL What is wrong with this statement? SELECT vendor_id, (SELECT vendor_name FROM vendors), avg(invoice_total) FROM invoices GROUP BY vendor_id; Select one: a. The subquery returns more than 1 row. b. You need a JOIN ON clause to pull from multiple tables. c. You cannot have a subquery in the SELECT statement. d. The result is a Cartesian Product. e. There is nothing wrong with this statement. What is wrong with this statement? SELECT vendor_name, avg(invoice_total) AS 'Invoice Total' FROM...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT