RE: [PHP] [NEWMAN] Collecting information from a my sql table.Dang, thanks (o;
  ----- Original Message ----- 
  From: Martin Towell 
  To: 'Philip J. Newman' ; [EMAIL PROTECTED] 
  Sent: Monday, February 25, 2002 12:22 PM
  Subject: RE: [PHP] [NEWMAN] Collecting information from a my sql table.


  how about ? 

  $row = mysql_fetch_array($sql_result); 
  $pub_id = $row["pub_id"]; 
  $pub_headline = $row["pub_headline"]; 
  $pub_dateline = $row["pub_dateline"]; 
  $pub_info = $row["pub_info"]; 
  $pub_image = $row["pub_image"]; 



  -----Original Message----- 
  From: Philip J. Newman [mailto:[EMAIL PROTECTED]] 
  Sent: Monday, February 25, 2002 10:16 AM 
  To: [EMAIL PROTECTED] 
  Subject: [PHP] [NEWMAN] Collecting information from a my sql table. 



  <?php 

  $sql = "SELECT * FROM `publisher` WHERE 1 AND `pub_id` = $pub_id LIMIT 1"; 
  $sql_result = mysql_query($sql, $connection) or die ("Could not get Query"); 

  while ($row = mysql_fetch_array($sql_result)) { 
  $pub_id = $row["pub_id"]; 
  $pub_headline = $row["pub_headline"]; 
  $pub_dateline = $row["pub_dateline"]; 
  $pub_info = $row["pub_info"]; 
  $pub_image = $row["pub_image"]; 

  } 

  ?> 

  When I want to get just one record is there an easyer way than using the while loop 
that I have been using? 



  Philip J. Newman 
  Philip's Domain - Internet Project. 
  http://www.philipsdomain.com/ 
  [EMAIL PROTECTED] 
  Phone: +64 25 6144012 

Reply via email to