SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Jan 2005
    Location
    Sokoto
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Post Help needed in terms of searching

    I am new to php/MySQL. I manage to install phptriad, and it was running fine, I created a db, and a table within it, The table name is Adm_List with the following fields 'S_No' 'Form_No' 'Name' 'Course' 'Level'. My problems
    are; I want to search this table using Form_No field as my search field and if the item been searched for is found, how do I display the entire record on the browser. Thanks

    Abdullahi M Abubakar

  2. #2

    Join Date
    Oct 2003
    Location
    €uroLand
    Posts
    1,340
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Something like this?
    PHP Code:
    $result=mysql_query('SELECT * FROM Adm_List WHERE Form_No="'.$SOME_VARIABLE.'"');
    while (
    $row=mysql_fetch_array($result))
    {
        
    /* Here you can access the individual dates by their column names
        $row['S_No']
        $row['Form_No']
        $row['Name']
        $row['Course']
        $row['Level'] */


  3. #3
    SitePoint Wizard swdev's Avatar
    Join Date
    Oct 2004
    Location
    UK
    Posts
    1,053
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Before you get into the coding, you need to answer some design questions


    1. How do you wnat your users to enter the Form_No - from a drop-down box or a text field?
    2. Will there be just one record returned, or can there be many records?
    3. How do you want the data to be displayed - in a table? just dumped on screen in a sngle line?
    4. Is any of the displayed data to be linked to other pages?

    Hope this hepls

  4. #4
    SitePoint Enthusiast
    Join Date
    Oct 2004
    Location
    Mexico
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I wonder what is your development enviroment, if you are using dreamweaver you can take a look at this extensions which work for you in term of creating this searchable tables (http://www.interaktonline.com/Produc...nsio/Overview/) and (http://www.interaktonline.com/Produc...rter/Overview/) are just some of the extensions that might be of great help for you.
    Alexandro Colorado


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
  •