From MySQL database show an item by id

2013-08-02T00:09:59

INSERT INTO `echipe` (`id`, `nume_echipa`, `victorii`, `infrangeri`, `steag`) VALUES
(1, 'Trencin', 0, 0, '/img/Trencin.png'),
(2, 'Astra', 0, 0, '/img/Astra.png');

so I want to do something like that

Astra vs Trencin but to get specify id from table and display name and other info.

My php script

<?php
$con=mysqli_connect("localhost", "root", "", "pariuri");
// check connection
if (mysqli_connect_errno())
    {
    echo "Failed to connect to MySQL: " . mysql_connect_error();
    }

$result = mysqli_query($con,"SELECT * FROM echipe");

while($row = mysqli_fetch_array($result))
    {
    echo $row['id'] . " " . $row['nume_echipa'];
    echo "<br>";
    }

mysqli_close($con);
?>

Copyright License:
Author:「Daniel Laurovici」,Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.
Link to:https://stackoverflow.com/questions/17999210/from-mysql-database-show-an-item-by-id

About “From MySQL database show an item by id” questions

INSERT INTO `echipe` (`id`, `nume_echipa`, `victorii`, `infrangeri`, `steag`) VALUES (1, 'Trencin', 0, 0, '/img/Trencin.png'), (2, 'Astra', 0, 0, '/img/Astra.png'); so I want to do something like ..
I'm trying to show an image from my database yet it wont show. I researched and tried different codes that I can understand but it is still no use. Here is my show image php code &lt;?php $host="
I am very new in Android.I want store spinner selected item id, which are saved in mysql database.I already retrieve items from mysql database to my spinner.Now I want to store that spinner selecte...
I've developed an PHP page that show all the itens from an MySQL table. Now I wanna show an specific item when the user click's one of the itens on this page. How do I get this specific ID an how d...
Submenu Part &lt;div id="subnavigation"&gt; &lt;?php $verbindung = mysql_connect("host", "user" , "pw") or die("Verbindung zur Daten
I want to show highest record id from mysql database on live. I am using following code and it's working on localhost but not on live site. &lt;?php $q ="SELECT LAST_INSERT_ID()"; $result =
I have a long running transaction running on a database ---TRANSACTION 2 4166167596, ACTIVE 14868 sec, process no 7906, OS thread id 1169635648 MySQL thread id 34318076, query id 1997556522 10.18...
I am trying to show some info from a mysql database on a page, but I get an error. Used code: &lt;?php if (isset($_GET["id"])); $newsarticle = ($_GET["id"]); $dbhost = 'localhost'; $dbuser = '
Here is some part of my main activity MainActivity : @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_ma...
I can update data properly using Java Swing and MySQL. If id is present in the database JOptionPane shows a dialog box that Updated data Succesfully and even id is not present in the database JOtio...

Copyright License:Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.