SunQuest
 
           General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
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  
Old November 7th, 2002, 01:21 AM
littleblackdog littleblackdog is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Anchorage
Posts: 118 littleblackdog User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Question Array question -

I've been knocking my head over this for some time. Here is what I have...

a table contianing information for a library. set up with : title, author, pub. ( all varchar input by a form - these three are input from textfield ), then I have : mediatype and subject columns that are ( char, input by radio buttons so I know what is being input... for mediatype only "Book or Textbook or Magazine" is being input in the column ) ...What I am trying to do is display rows in the database by title from a query - easy.

What I'm having trouble with is calling for specific data. I want users to be able to query the db for two conditions:

1. from a form with radio buttons for all the mediatypes, so the click the book button,then..
2. for a key word in the db for any rows ( books only!) that contain the key word.

I also am having trouble displaying all rows that are books.

I wouldn't be having this problem if I made all the media types their own columns in the db, but I didn't.

Is this where Assoc_array comes in?

I've been searching tutorials, books, all over for an example of this, but to no success.

Help
__________________
bow wow!

Reply With Quote
  #2  
Old November 7th, 2002, 08:38 AM
fatal fatal is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Posts: 9 fatal User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
PHP Code:
 $sql "SELECT books FROM table where mediatype='php'";
$results mysql_query$sql$connect);
while( 
$row mysql_fetch_assoc($results))
{
   
$books $row['books'];
   echo 
$books;


------

Hopefully that piece will work.

Last edited by fatal : November 7th, 2002 at 08:45 AM.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Array question -


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway