|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Help with query
I have had success at making a query page for a book database, lets users query for key words from specific rows. But...
I want some help. I've been looking for example code or technique : ) on how to limit variables...example: query by mediatype, and keyword. A radio button selection for mediatype ( they are entered using radio buttons), the mediatype row has entries from a radio button list on a form page to enter the books/videos and I don't know how to choose the choice from the mediatype row, then by keyword.. Brain is frozen. Thanks. Any examples out there?
__________________
bow wow! |
|
#2
|
|||
|
|||
|
I dont really get what your saying, could you give another example, and ill try helping you
|
|
#3
|
|||
|
|||
|
Better Example
I didn't explain myself very well, sorry.
I want to query my database by searching several columns in only one database ( for now ). One column has entries from a form, input by radio buttons, so it has specific data, names of media types. Other columns hold misc. data. I want to query the database by choosing a specific entry type in the column, for example: only magazines , or only books. When the data was entered, it went in with a mix of radio buttons for the media type ( magazine, book, map, etc.), and text entries for title, author, etc. I'm hoping this will make searches more specific. - like only looking for only magazines that have "dog food" in them. It will bring back queries for "only magazines with dog food term". Am I making sense? I'd post the code I have but it only queries a column in db for a keyterm. I want it to search 1 column, only one type of choice in that column, and then key terms from all fields in rows with only that choice in column. I'm getting more confussed. Here is the database - The "mediatype" column holds entries from several radio buttons of mediatypes: book, newspape, magazine, etc. I want query the db for only entries that have one of these specific entries...enough said? CREATE TABLE bookinputstudent ( id tinyint(4) NOT NULL auto_increment, title varchar(50) default NULL, authorname varchar(50) default NULL, mediatype char(15) NOT NULL default '', publisher varchar(50) default NULL, subject char(15) NOT NULL default '', edition varchar(50) NOT NULL default '', isbn varchar(50) default NULL, quantity varchar(50) default NULL, location varchar(50) default NULL, description text, image varchar(50) NOT NULL default '', PRIMARY KEY (id), UNIQUE KEY id (id) ) I'm reading Mytch's article. Any others address complex queries? |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Help with query |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|