TechSpott - Computer and technology forums

Go Back   TechSpott - Computer and technology forums > Webmasters > Database Management > MySQL
MySQL Forum dedicated to the world's most popular open source database engine.

Reply
 
Thread Tools Display Modes
Old April 11th, 2010, 07:16 AM   #1 (permalink)
RickyG
Guest
 
Posts: n/a
Default how can I make a link which will display data entries from mysql table?

I have a database with a lot of unnecessary data collected. I made a table with 3 columns showing only the Ref. No., Name, Datestamp. I want to add a fourth column which will display a "more details" and when clicked it will open a new page with the other details of that entry. Is this possible?

I am using this code:

$query = "SELECT * FROM `tablename` ORDER BY `Ref` DESC LIMIT 0, 100 ";
$result=mysql_query($query);

$num=mysql_numrows($result);

mysql_close();
?>
<p align="justify" class="body3px">
<table border="0" cellspacing="2" cellpadding="2">
<tr>
<th>Request<br/>ID</th>
<th>Name</th>
<th>Date</th>
</tr>

<?php
$i=0;
while ($i < $num) {

$f1=mysql_result($result,$i,"Ref");
$f2=mysql_result($result,$i,"Name");
$f3=mysql_result($result,$i,"Date");
?>

<tr>
<td><?php echo $f1; ?></td>
<td><?php echo $f2; ?></td>
<td><?php echo $f3; ?></td>
</tr>

<?php
$i++;
}
  Reply With Quote Share with Facebook
Reply

Bookmarks

Tags
data, display, entries, link, make, mysql, table


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
in want to display PHP query results in a table? retlav PHP 0 April 10th, 2010 12:38 AM
How can I get data from an html table using php? Wanpo PHP 1 April 4th, 2010 03:28 AM
does it make sense to have 2 mysql databases instead of one? Fagush MySQL 2 April 4th, 2010 03:25 AM
Why does mysql keep inserting data in random places and how can I fix this? John C MySQL 0 March 31st, 2010 03:41 PM
How do I make my MySQL table automatically make a timestamp when new data is added? Carbonbased Lifeform MySQL 0 March 31st, 2010 03:40 PM

 
Forum Stats
Members: 14,375
Threads: 20,386
Posts: 27,878
Total Online: 47

Newest Member: AAccedlyGolo

Latest Threads

Advertisements

Support our advertisers!

Amazon
Sears
Macys
1800flowers.com
Drugstore.com


Carbonite Online-Backups
Tiger Direct
Tech Depot
Buy.com
Office Depot
Fatcow
HostGator


TripsNow.us
Marriott
Expedia
CheapTickets.com
OneTravel
Hotwire

Are you a Fan?

Share this on Facebook

Tag Cloud

Partner Links


Contact Us - Home - Archive - Privacy Statement - Top - Copyright © 2009-2010, TechSpott - All times are GMT -4. Time is 09:43 PM

Powered by vBulletin® Copyright © Jelsoft Enterprises Ltd. :: SEO by vBSEO