Results 1 to 10 of 15
Threaded View
-
6th May 2011, 04:37 AM #13OPMember
Hello,
Thanks for your help,
I also wanted to clarify, that i have two id fields on the table.
1 is "id" which is the id for a user who posts to the database
2 is "iid" which is the id for the post
I am now using this code:
<?php
include 'dbc.php';
?>
<?php
// First check if we have a id of a download to show in detail
if(isset($_GET['iid']) && is_numeric($_GET['iid']) && strlen($_GET['iid'] < 7)) {
$sql = mysql_query("SELECT id, title,description,download,date FROM index WHERE iid=".$_GET['iid']);
// output your detailed info here. Smart to check if it exists first. Throw a message if it doesn't exist and if it does show the download.
}
// if no download number then we'll just show the list as normal
else
{
$sql = mysql_query("SELECT id, title FROM index LIMIT 30");
while($row = mysql_fetch_assoc($sql))
{
echo '<tr><td>'.$row['id'].'</td><td><a href="index.php?id='.$row['id'].'">'.$row['title'].'</a></td><td>'.$row['description'].'</td><td>'.$row['download'].'</td></tr>';
}
}
?>
After i execute it i get this:
Just a blank screen:
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Creating tables in RVSiteBuilder
By Areon in forum Server ManagementReplies: 0Last Post: 3rd Mar 2014, 03:15 PM -
How Should I Organize My SQL Tables?
By Robin Hood in forum Web Development AreaReplies: 7Last Post: 22nd Aug 2012, 03:54 PM -
Exporting tables from one to another [help req]
By xtone in forum Web Development AreaReplies: 6Last Post: 27th Sep 2011, 11:05 PM -
help me mysql tables are corupted
By awaisdik2003 in forum vBulletinReplies: 0Last Post: 21st Sep 2010, 12:38 PM -
IP tables warning..how to fix it
By lucy fox in forum Server ManagementReplies: 2Last Post: 22nd Apr 2010, 11:04 AM
themaCreator - create posts from...
Version 3.48 released. Open older version (or...