Jump to content

Missing data after processing.


Fearpig

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.
Link to comment
https://forums.phpfreaks.com/topic/17485-missing-data-after-processing/
Share on other sites

Archived

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

×
×
  • 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.