EZ MySQL Help

Discussion in 'OT Technology' started by doggfather, Oct 29, 2005.

  1. doggfather

    doggfather New Member

    Joined:
    Aug 6, 2005
    Messages:
    224
    Likes Received:
    0
    Lets say I have "Nickname" as a field

    what php command do I use to get it so it prints out all the nicknames

    mysql_fetch_.... maybe something like that but I can't find the command
     
  2. kingtoad

    kingtoad OT Supporter

    Joined:
    Sep 2, 2003
    Messages:
    55,922
    Likes Received:
    11
    Location:
    Los Angeles
    You can query data anyway you choose. The function you're probably thinking of is "mysql_fetch_array();". This function grabs the query data and turns the data into an array. Here is an example

    PHP:
    while ($data mysql_fetch_array(mysql_query('SELECT `nickname` FROM `table_name`')))
    {
           echo 
    $data['nickname'];
    }
    Furthermore, you can obtain additional information by looking through the PHP manual.
    http://www.php.net/manual/en/
     

Share This Page