SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: mysql database

  1. #1
    SitePoint Member
    Join Date
    Oct 2009
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question mysql database

    I wish to make a dynamic HTML table from a mysql query . Have read about
    PHP array -

  2. #2
    SitePoint Enthusiast SimonJ621's Avatar
    Join Date
    Mar 2006
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not exactly sure what you're asking... but here is one way to do it with PHP:

    PHP Code:
    $result mysql_query("SELECT id, name, salary FROM employees"$conn);
    while (list(
    $id$name$salary) = mysql_fetch_row($result)) {
        echo 
    " <tr>\n" .
              
    "  <td><a href=\"info.php?id=$id\">$name</a></td>\n" .
              
    "  <td>$salary</td>\n" .
              
    " </tr>\n";



Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •