Jump to content

Recommended Posts

What could cause a script to miss 1 database entry.

 

I've got 5 database entry and the script only shows 4.

And for some resion it always misses id number 2 but when its edited in the mysql then another database entry goes missing.

 

$con = mysql_connect($db_server, $db_username, $db_password); // Connects to your database
if (!$con) {
		die('Could not connect: ' . mysql_error()); // error message when failed to connect.
		}
mysql_select_db($db_name) or die(mysql_error());
$query = "SELECT * FROM GalkaDownloads ORDER BY `name` ASC";
$result = mysql_query( $query );
$data = mysql_fetch_assoc($result);

while($data = mysql_fetch_assoc($result)) {
?>
  <tr>
    <td align="left" valign="top" bgcolor="#FFFFFF"><a href="download.php?id=<?php echo $data['id']; ?>"><?php echo $data['name']; ?></a></td>
    <td align="left" valign="top" bgcolor="#FFFFFF"><?php echo $data['Category']; ?></td>
    <td align="center" valign="top" bgcolor="#FFFFFF"><strong><?php echo $data['count']; ?></strong></td>
    <td align="left" valign="top" bgcolor="#FFFFFF"><?php echo nl2br($data['information']); ?></td>
  </tr>
<?php
  }
?>  

Link to comment
https://forums.phpfreaks.com/topic/202592-php-missing-1-database-entry/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.