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