Have a look at the PHP mysql_fetch_array and mysql_fetch_row functions and
associated documentation...

<?php
  //assuming the db is already connected
  $query = "select id,name from Categories";
  $res = mysql_query($query,$dbh) or die ("bad query");
  while($row = mysql_fetch_array($res)) {
    echo $row["id"]."----".$row["Name"]."<br>";
  }
?>

On Sun, 10 Jun 2001, Vladimir Kravtsov wrote:

> Here is my db hierarchy:
> Database: xtopsites
> Table: Categories
> id    Name
> 1    Name1
> 2    Name2
> 3    Name3
> 4    Name4
> 5    Name5
> 6    Name6
> 
> 
> I would like the user to get to a sign up form and have all the names
> of the categories displayed.........is this possible to do using
> fetch_array? If it isn't is there another way? (Also could you provide a
> valid syntax?)



---------------------------------------------------------------------
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