Fearpig Posted August 14, 2006 Share Posted August 14, 2006 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 workingmysql_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 nameswhile ($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. Quote Link to comment Share on other sites More sharing options...
Fearpig Posted August 14, 2006 Author Share Posted August 14, 2006 #bump# Quote Link to comment Share on other sites More sharing options...
AndyB Posted August 14, 2006 Share Posted August 14, 2006 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. Quote Link to comment Share on other sites More sharing options...
Fearpig Posted August 14, 2006 Author Share Posted August 14, 2006 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.