Jump to content


Photo

php - mysql problem


  • Please log in to reply
2 replies to this topic

#1 trawler

trawler
  • Members
  • Pip
  • Newbie
  • 2 posts

Posted 09 May 2006 - 02:48 PM

I'm desiging a form which uses fields drawn out of a mysql db.
I've already managed to figure out how to display a drop-down menu that's drawn from a mysql table.

My problem, however, is with a sub-menu.
Basically, it's a form that's supposed to give network technicians some information about the clients to which they're sent.

Whoever fills out the form picks a router/fw type from a drop-down menu (connected to a table in the mysql db), and then a sub-menu is supposed to open up, another drop-down, from which they pick the specific model.

I've created one big table containing all the models we use, and it can be sorted according to manufacturer.

My question is - I want to have one single query made from the db (SELECT *), from which I can extract the appropriate records later.

I suppose I need to set up an array, but i'm not sure how to...

Could use your help :)

#2 ober

ober
  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 09 May 2006 - 02:50 PM

Well keep in mind that PHP is a server-side scripting language, so you're going to either have to use Javascript or AJAX to open the second drop down.

Info: PHP Manual


#3 trawler

trawler
  • Members
  • Pip
  • Newbie
  • 2 posts

Posted 09 May 2006 - 03:48 PM

[!--quoteo(post=372617:date=May 9 2006, 09:50 AM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ May 9 2006, 09:50 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Well keep in mind that PHP is a server-side scripting language, so you're going to either have to use Javascript or AJAX to open the second drop down.
[/quote]
Sure, I already written the javascript function that does that.
My problem however is how to store and then manipulate the data (sort and pick specific records), without having to perform multiple queries.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users