I'm trying to query my database to fill in data First Name Last Name. Using
the script below I get (depending on the ContactID I enter)

Contact: 1 1 or 2 2

If ContactID=0 I get


Any ideas on what I am doing wrong?


Steve Fitzgerald

    $sql="SELECT * FROM contacts WHERE ContactID='$ContactID'";
  $result = mysql_query($sql,$db);

   printf("%s\n", mysql_result($result,"FirstName"));

printf("%s<br>\n", mysql_result($result,"LastName"));


PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to