Jump to content

Archived

This topic is now archived and is closed to further replies.

Fearpig

Missing data after processing.

Recommended Posts

Hi Guys,
I could do with some help yet again!

I've written the following code which should list all the members of a deparment in a table with their e-mail address. My problem is that the table is created showing the correct number of lilnes but some of the cells are blank where their names should be.

Here's the code:

[code]<?php

$db = mysql_connect("localhost", "root", "password");

//$id = $_GET['id']; quoted out till I get it working

mysql_select_db("Telephonelist",$db);

$result = mysql_query("SELECT * FROM tbl_telephonenumbers WHERE Department=1",$db);

echo "<table border=1>\n";

echo "<tr><td><B>Name</B></td><td><B>e-Mail</B></tr>\n";
//colum names

while ($myrow = mysql_fetch_array($result)) {

printf("<tr><td>%s %s</td><td>%s</td></tr>", $myrow["First_Name"], $myrow["Last_Name"], $myrow["e-Mail"]);


}

echo "</table>\n";

?>[/code]

Any help would be appreciated....
Cheers
Tom.

Share this post


Link to post
Share on other sites
If some rows are fully correct, we know your code is fine. So surely the rows with empty cells must be database table rows with missing data.

Share this post


Link to post
Share on other sites
Ha.....
You wouldn't believe it! My data import must have failed to MySQL. Have just browsed the data using SQL manager and there's huge chunks missing.

Cheers Andy.

Tom.

Share this post


Link to post
Share on other sites

×

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.