city and province Programming Databases by solomon_13000 … is it advisable for me to have the city and province on a seperate table and then link them to the… a city is govern by a mayor where else a province is govern by a governor. [B][U]country [/U][/B… [B][U]city[/U][/B] - cityId - description - countryId [B][U]province[/U][/B] - provinceId - description - countryId Re: city and province Programming Databases by solomon_13000 … option to be selected will either be a city or province or state or contituent. For example if I select the… country as Venezuela then I can select only province. When I select the country Australia then I can select… city. Does this mean I create a seperate table representing province, state, constituent and city?. sort students name by province Programming Software Development by jaque322 i have an arraylist, that stores objects from a class called prematricula and every object stored has name and province how i can do to pass the name of the province and the method return the names of the students sorted alfabethically... please if someone can help me.... Re: city and province Programming Databases by timothybard Yes, city and province should be different tables; however, in addition to that, do provinces contain cities? If so, then perhaps you should use the provinceID as a FK in the city table. Re: city and province Programming Databases by debasisdas CITY should refer to province not to country table directly. Re: City/province drop down list Programming Web Development by oree Not sure i explained myself correctly,i am looking to have 2 drop down lists, 1 with provinces/states and the other with the corresponding cities in that province. example: Toronto will show up when i choose ontario. or Los Angeles will be an option if the state is California. I cant have Toronto in California. Re: City/province drop down list Programming Web Development by oree thanks for the will to help i actually got around this by prompting the user before for a province and city. took the long way around :) Re: city and province Programming Databases by markb536 share with details. Thanks a lot. Re: city and province Programming Databases by solomon_13000 If yes, a seperate table indeed is to be created, then how do I associate it to a country? Re: city and province Programming Databases by solomon_13000 I know how, base on the countryId. :) Re: city and province Programming Databases by debasisdas Once you start start thinking, will get answer to most of your own questions. Re: city and province Programming Databases by solomon_13000 correct I should focus on one thing at a time :) Re: sort students name by province Programming Software Development by peter_budo Create method that will take an ArrayList as an agrument and will have ArrayList as return value. Something along the line of this method showed by masijade in [URL="http://www.daniweb.com/forums/thread185239.html"]this thread[/URL] Re: sort students name by province Programming Software Development by kvprajapati Use java.lang.Comparable interface and java.util.Arrays class. Here is sample code: Emp.java [CODE=Java] public class Emp implements Comparable { private String name; private String city; public Emp(){} public Emp(String name,String city) { this.city=city; this.name=name;} public int compareTo(Object p) {… Re: sort students name by province Programming Software Development by masijade Yes, as long as it's not JME implementing Comparable or creating a Comparator is the way to go, but there is no reason to use Arrays. Collections also has sort methods. No reason to convert to an array and back to a list, leave it as a list. Re: sort students name by province Programming Software Development by kvprajapati I am sorry. Which collection class has sort method? Re: sort students name by province Programming Software Development by masijade [QUOTE=adatapost;898550]I am sorry. Which collection class has sort method?[/QUOTE] Collections That is a Class in and of itself, much like Arrays. Re: sort students name by province Programming Software Development by kvprajapati Thanks masijade. I appreciate your help. Thanks again. Re: sort students name by province Programming Software Development by peter_budo If I was on [URL="http://books.google.com/books?id=Eh5NcvegzMkC&lpg=RA1-PA596&ots=ESM6GF-_Lt&dq=sun%20certified%20programmer%20for%20java%206%20generics%20and%20collections&pg=RA1-PA569"]chapter 7[/URL] of SCJP study guide I would have answered correctly ;) , but I'm only chapter 3 :$ Re: sort students name by province Programming Software Development by masijade [QUOTE=peter_budo;898747]If I was on [URL="http://books.google.com/books?id=Eh5NcvegzMkC&lpg=RA1-PA596&ots=ESM6GF-_Lt&dq=sun%20certified%20programmer%20for%20java%206%20generics%20and%20collections&pg=RA1-PA569"]chapter 7[/URL] of SCJP study guide I would have answered correctly ;) , but I'm only chapter 3 :$[/QUOTE] … Re: sort students name by province Programming Software Development by jaque322 thanks to everybody Re: Change-a-Letter-or-Two-Game Community Center Geeks' Lounge by ~s.o.s~ province Help for comparing strings and copying strings please. Programming Software Development by Phan …(30); _strlwr (prov.province); if (prov.province[0] <96 || prov.province[0] >123) { prov.province[0]-=32; } //… prov update_provincepop (prov prov) { int lengthprov; // Changing the Province Population clear_screen(); set_color (cCYAN,cBLACK); set_cursor_pos (32,1); cout<… Re: AJAX dropdown list clear before value Programming Web Development by Airshow …lt;sections.length; i++) { m0 = sections[i] + '_' + 'province'; $(m0).disabled = (sections[i] !== s) ? true : false; for(…quot;150"> <select name="province" id="reg_province" onChange="…quot;150"> <select name="province" id="ons_province" onChange="getNextMenu2… Re: AJAX dropdown list clear before value Programming Web Development by Airshow …width="150"> <select name="province" id="reg_province" onChange="getNextMenu(0…quot;> <option value="">Select province</option> <option value="p1&…width="150"> <select name="province" id="ons_province" onChange="getNextMenu2(0… Problem with PhP MySql Ajax dropdown code Programming Web Development by StefaRSA …;> <option value="">Select Province</option> <option value="1&…select> </td> </tr> <!-- Province ends here --> <!-- Town goes here --> &…] The townsrc.php: [CODE]<? $country=intval($_GET['province']); $query=("SELECT * FROM search_town WHERE provId=$country ORDER… Problem with PhP MySql Ajax dropdown script Programming Web Development by StefaRSA …problem? The Form where the dropdown is: [CODE]<!-- Province goes here --> <tr> <td…;> <option value="">Select Province</option> <option value="1…] The townsrc.php: [CODE]<? $country=intval($_GET['province']); $query=("SELECT * FROM search_town WHERE provId=$country ORDER… Re: Problem with PhP MySql Ajax dropdown script Programming Web Development by essential … ].value; url = (( method === "GET" ) ? "../dir/townsrc.php?province=" + qstr + "&amp;city=" + sel2 : "../dir…-8;") : xmlHttp ); xmlHttp.send((( method === "POST" ) ? "province=" + qstr + "&amp;city=" + sel2 : null )); return… AJAX dropdown list clear before value Programming Web Development by nicosa …quot;150"><select name="province" id="province" onChange="getNextMenu(0)">… width="150"><select name="province" id="province2" onChange="getNextMenu2… down ajax list will appear and visitor can chose province, city and price will automaticly appear after chose city… Re: help me on how to change this code Programming Web Development by god_1896 …break; } case "province": { if ($select!=all) { $province=$select; $select="province"; } else $province=$select; break; $heading="…value->Province_id.'"'; if ($value->Province_id==@$province) echo ' selected="selected"'; echo '>…