Jump to content

satishgadhave

Members
  • Posts

    13
  • Joined

  • Last visited

Posts posted by satishgadhave

  1. I have a table named as 'books' and it contains book details including title and ISBN number for each book.

    Some books have same name and ISBN number but other books have same name but different ISBN.

     

    Requirement is when I display book listing on website, books with same name should not appear except they have different ISBN numbers.

     

    If I used 'group by title' then only one of the books with different ISBN numbers and same name appears where all of such books should appear.

     

    Any help will be appreciated.

    Thanks.

  2. suppose a new user registered to become a member. You got user's details (name, address etc.) from registration form and saved in database.

     

    Now, when this user logs in, views a play and wants more information, you redirect him to a form.

     

    In this form file you can fetch user details you already entered in the database.

    Echo this information in HTML part of the form.

     

    e.g.

    (i'm assuming you have user's id when he logs in)

    <?php
    $query = "SELECT * FROM users WHERE userId = ".$userId;
    $resultSet = mysql_query($query, $link);        //-- $link is database connection link
    $userData = mysql_fetch_array($resultSet);
    ?>
    <html>
    <head></head>
    <body>
    <form action="" method="post">
    Name: <input type="text" name="userName" value="<?php echo $userData['userName']; ?>" />
    Address: <input type="text" name="address" value="<?php echo $userData['address']; ?>" />
    Question: <input type="text" name="question" value="" />
    <input type="submit" name="submit" value=" Submit " />
    </form>
    </body>
    </html>
    
    

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.