SunQuest
           PHP Coding
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Coding

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old June 2nd, 2002, 11:53 AM
chobo4ever chobo4ever is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Vienna, Austria
Posts: 63 chobo4ever User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
listing email and name problem

I have the following code. Its not mine but it should work. what it should do is list the email adresses and names from an database. but it lists just the names. the strange thing is, that it already worked and now I cant find a way get it right.
Code:
<?

$link = mysql_connect("", "");

mysql_select_db("chobo4ever2_de_db",$link);

$Result = mysql_query("SELECT * FROM ltw_email",$link);
echo "<table border=1>";
echo "<tr><td><b>Name</b></td><td><b>Email</b></tr>";
while ($Row = mysql_fetch_row($Result))
{
printf ("<tr><td>%s %s</td><td>%s</td></tr>",
$Row[1], $Row[2], $Row[3]);
}


echo "</table>";

?>

thx in advance

Reply With Quote
  #2  
Old June 2nd, 2002, 09:03 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: listing email and name problem

I don't see anything wrong with the code. Try that query :

SELECT * FROM ltw_email

directly against the database and make sure you get emails back from that.....

Reply With Quote
  #3  
Old June 2nd, 2002, 10:07 PM
CmdrDats CmdrDats is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: <br><img src='http://www.dats.co.za/icon.gif'>
Posts: 269 CmdrDats User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to CmdrDats Send a message via AIM to CmdrDats Send a message via Yahoo to CmdrDats
RE: listing email and name problem

try print_r'ing $Row and check what gets returned, i don't personally trust mysql_fetch_row.. use mysql_fetch_assoc if you can..

And yeah, check what results "SELECT * FROM ltw_email" gives you..

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Coding > listing email and name problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway