SitePoint Sponsor |
|
User Tag List
Results 1 to 4 of 4
-
Jan 4, 2005, 07:00 #1
- Join Date
- Jan 2005
- Location
- Sokoto
- Posts
- 2
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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
-
Jan 4, 2005, 07:13 #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'] */
}
-
Jan 4, 2005, 07:15 #3
Before you get into the coding, you need to answer some design questions
- How do you wnat your users to enter the Form_No - from a drop-down box or a text field?
- Will there be just one record returned, or can there be many records?
- How do you want the data to be displayed - in a table? just dumped on screen in a sngle line?
- Is any of the displayed data to be linked to other pages?
Hope this hepls
-
Jan 4, 2005, 07:40 #4
- 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