Hi,

I finally established a connection to my db after I realized that it was
located in a different directory than that which I kept placing my php
files.  As some would say, "D'OH!"

The code below is intended to select and display all 1300 names from the
NAMES_TBL but is only returning the first row.  I'm still a bit new to php
so this is probably something simple - a shove in the right direction would
be quite helpful.

thanks!

chris

<?php
  $db = mysql_connect("host", "user", "pwd");
  mysql_select_db("dbname",$db);
  $result = mysql_query("SELECT * FROM NAMES_TBL",$db);
  printf("DBID: %s<br>\n", mysql_result($result,0,"DBID"));
  printf("First Name: %s<br>\n", mysql_result
  ($result,0,"FIRST_NAME"));
  printf("Last Name: %s<br>\n", mysql_result($result,0,"LAST_NAME"));
?>

---------------------------------------------------------------------------


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to