Page 1 of 1

sql troubles.

Posted: Tue Apr 25, 2006 12:31 pm
by psychotomus
whats wrong with this. it doesnt display no data even though there is data.

Code: Select all

<?php
$member_id = $_SESSION['userid'];
include 'config.php';
$result = mysql_query( "SELECT * FROM po2_files WHERE member_id='$member_id'" ) or die("Create table Error: ".mysql_error());//

while( $row = mysql_fetch_array($result))
{	//Store Record Of Data in $row
print '<tr> 
         <td valign="top"><div align="center"><a href="view_file.php?file='. $row['file_name']. '"></div></td>
         <td valign="top"><div align="center"><strong><a href="my_files_delete.php?file='. $row['file_name']. '"></strong></div></td>
                    </tr>';
}
?>

Posted: Tue Apr 25, 2006 12:38 pm
by feyd
It would suggest that no records matched $member_id

Posted: Tue Apr 25, 2006 1:08 pm
by psychotomus
$member_id does have a value and records do exist when looking in my sql cpanel.

Posted: Tue Apr 25, 2006 1:22 pm
by feyd
what does mysql_num_rows() say?

Posted: Tue Apr 25, 2006 1:22 pm
by psychotomus
was html problems not php.