View Single Post
Old 04-01-2008, 12:21 PM   #5 (permalink)
abiko
The Contributor
 
abiko's Avatar
 
Join Date: Feb 2008
Location: Croatia
Posts: 90
Thanks: 4
abiko is on a distinguished road
Default

You can always use the WHERE in your SQL. Of course you will have to know the id or any other "connection" you can make to get that item out.

Your query would look like then
PHP Code:
<?php
include ("connect.php");

mysql_select_db("test_db"$con);

// The ID part
// Lets say you have index.php?id=12
$id $_GET['id'];
if ( 
is_numeric$id ) ) {
$result mysql_query("SELECT * FROM test WHERE id = '".$id."'");

while ( 
$res mysql_fetch_array($result) ) {
 echo 
"<td> " $res['test_the_name'] . " </td>";
}


print(
"<td> " $res['test the name'] . " </td>");

mysql_close($con);
} else {
 die( 
"Error");
}

?>
I'm just guessing here, can you post your db table structure?
__________________
Back from sysadmins to the programmers.
Send a message via ICQ to abiko Send a message via MSN to abiko
abiko is offline  
Reply With Quote
The Following User Says Thank You to abiko For This Useful Post:
Face_Of_Boe (01-06-2009)