|
Not logged in [Login - Register] |
You Are Not Registered Or Not Logged In |
Corsa Sport » Message Board » Off Day » Geek Day » MYSQL Problem(s) » Post Reply
|
Ian |
posted on 14th Jan 07 at 14:21 |
The ASP.net bindings are just a simple way of doing it for you, same theory as you still need to get the data back to the client, just .net will automate the development process. PHP you are pretty much on your own. | |
liamC |
posted on 14th Jan 07 at 12:18 |
Had a rethink on these drop down boxes and I think I'm going to do it a different way... | |
James |
posted on 14th Jan 07 at 02:48 |
quote: Dunno about PHP but in ASP.Net I would only bind data to the second dropdown (model), when the make drop down list changes, that way you can pass the make into the parameter and bind the model dropdown list to Select * From TABLE Where Make = Value passed in from first dropdown. | |
Ian |
posted on 13th Jan 07 at 22:58 |
It needs two fields - the primary key integer which goes inside the value attribute of the option tag, and the name which gets displayed on the list. | |
liamC |
posted on 13th Jan 07 at 22:20 |
quote: | |
Ian |
posted on 13th Jan 07 at 22:05 |
Have a look how they do it. AJAX is the best approach but also the most difficult. | |
liamC |
posted on 13th Jan 07 at 21:34 |
quote: How would you suggest getting around this mate? Obviously I want it so that when you choose a Ford it only lists Ford models etc, just like the Auto Trader site... | |
liamC |
posted on 13th Jan 07 at 21:16 |
Yeah I changed to PHP mate but the 2 problems were as above. | |
Ian |
posted on 13th Jan 07 at 21:14 |
Thats PHP not HTML. Try it in code view. | |
liamC |
posted on 13th Jan 07 at 21:01 |
Having trouble getting this drop down working. The first echo and the "; dont get recognised within the code by Dreamweaver. I presume that's Dreamweaver being it's normal self? | |
Ian |
posted on 13th Jan 07 at 20:57 |
Yeah, make and model are normalised as they should be. | |
liamC |
posted on 13th Jan 07 at 20:06 |
Well basically I have a make table and a model table and I am busy populating the model table bevause as you say it's massive! | |
Ian |
posted on 13th Jan 07 at 20:06 |
Yeah the pages that your dropdowns appear on will have to be a PHP page so you can run the database queries on it. | |
liamC |
posted on 13th Jan 07 at 20:04 |
Many thanks, I'll give it a go. | |
Ian |
posted on 13th Jan 07 at 20:02 |
They will be two separate dropdowns though. If you want to have so you select Vauxhall then only get Vauxhall cars on the other list you'll either need to repopulate the list using AJAX (nifty but difficult), or reload the page (clunky and slow) or put the model on another page further through the application. | |
Ian |
posted on 13th Jan 07 at 20:00 |
So you want to fill the dropdown boxes with stuff from the database? | |
liamC |
posted on 13th Jan 07 at 19:56 |
You're a star mate! Working spot on, thanks alot. :D:D | |
Ian |
posted on 13th Jan 07 at 19:51 |
The Extra colum needs auto_increment flag, just hadn't been set up right. Also when you're inserting, use something like | |
Ian |
posted on 13th Jan 07 at 19:49 |
ALTER TABLE tblGMD CHANGE fldID fldID INT(15) UNSIGNED NOT NULL AUTO_INCREMENT; | |
liamC |
posted on 13th Jan 07 at 19:42 |
Ian |
posted on 13th Jan 07 at 19:38 |
Run that command. | |
liamC |
posted on 13th Jan 07 at 19:32 |
Yeah I have an auto incremement key (called fldID) which I want it to give it an automatic ID to each row but I can't get it generating its own ID. | |
Ian |
posted on 13th Jan 07 at 19:29 |
Do you have an auto_increment primary key? Show me the output to: | |
liamC |
posted on 13th Jan 07 at 19:22 |
Made a mysql database with tables etc which is all fine and up and running. |