Search Results

Search found 1854 results on 75 pages for 'country'.

Page 17/75 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • Subquery using derived table in Hibernate HQL

    - by Vladimir
    I have a Hibernate HQL question. I'd like to write a subquery as a derived table (for performance reasons). Is it possible to do that in HQL? Example: FROM Customer WHERE country.id in (SELECT id FROM (SELECT id FROM Country where type='GREEN') derivedTable) (btw, this is just a sample query so don't give advices on rewriting it, is just the derived table concept I'm interested in) Thanks.

    Read the article

  • how to use spinner

    - by corotana
    I am very new to android. I want to use 2 spinners in my application, one shows the countries list, when any country is selected the other spinner should show the list of cities of that country. when city is selected some action is performed. plz help me with some sample code. thanks in anticipation

    Read the article

  • Selecting info from multiple tables for one unique ID with PHP and MySQL

    - by Mark
    I'm using PHP and MySQL. Is this the best method to select information about "user_1" from four different tables? I know it works, because I have tried it. But is this the preferred method of selecting information from multiple tables for "user_1"? $query = "SELECT table_1.username, table_2.city, table_3.state, table_4.country FROM table_1 JOIN table_2 ON table_1.username=table_2.city JOIN table_3 ON table_1.username=table_3.state JOIN table_4 ON table_1.username=table_4.country WHERE table_1.username = 'user_1'";

    Read the article

  • Versions of Enum

    - by phenevo
    Hi, I've got Enum: public enum ObjectType { Country=0, Region=1, Province=2, City=3, Hotel=4 } I have two applications in two language versions, and this Enum is displaying in some place, so depends of language version I wanna displaying correct version of Enum in german version instead Country Land etc. This Application are using the same websercice which has declaration of this enum.

    Read the article

  • Problem with write query

    - by phenevo
    Hi, I've got collection of geo objects in database: There are four Tables: Countries Regions Provinces Cities Cities has inter alia ProvinceCode Provinces has inter alia regionCode Regions has inter alia CountryCode And there is fifth Table: Descriptions ObjectCode ObjectType(country, region, province, city) Description. How to get from Descriptions table, all descriptions from objects which are in the definite country ??

    Read the article

  • Android multiple spinners

    - by DixieFlatline
    Hello! I have 3 spinners (dropdown menus). I would like the user to select item from the first one and that would determine the options(different string array) on the second and on the third spinner. E.g. user selects the country in the first spinner and then gets popular music groups in that country on the second spinner and popular dishes on the third. What is the easiest way to do this?

    Read the article

  • magento getCollection() can we put where condition?

    - by jarus
    hello , i am working on a magento project and i need to get the value according to country wise like select address where country ="Nepal" can we send the where condition in getCollection() function $collection = Mage::getModel('relocator/location')-getCollection(); any help will be appreciated

    Read the article

  • MySQL Trigger with Update

    - by Matthew
    I'm trying to update a row when it gets updated to keep one of the columns consistant, CREATE TRIGGER user_country BEFORE UPDATE ON user_billing FOR EACH ROW BEGIN IF NEW.billing_country = OLD.billing_country AND NEW.country_id != OLD.country_id THEN SET NEW.billing_country = cms.country.country_name WHERE cms.country.country_id = NEW.country_id; END IF; END But I keep recieving error #1064, Is there a way to update a row based on another row's data when the row is getting updated?

    Read the article

  • Pound symbol not displaying on web page

    - by Gublooo
    Hello I have a mysql database table to store country name and currency symbol - the CHARSET has correctly set to UTF8. This is example data inserted into the table insert into country ( country_name, currency_name, currency_code, currency_symbol) values ('UK','Pounds','GBP','£'); When I look in the database - the pound symbol appears fine - but when I retrieve it from the database and display it on the website - a weird square symbol shows up with a question mark inside instead of the pound symbol. You can look at it here - http://www.didyouswipe.com/profile/view-profile/user_id/181 Please advice Thanks

    Read the article

  • Rewrite URL if file exists

    - by Anthony Faull
    I need to redirect web requests of the form /{language}-{country}/{file} to: /{language}-{country}/{file} if it exists, otherwise /{language}/{file} if it exists, otherwise /en-US/{file} The existing .htaccess fulfils requirements 1 and 3. What changes do I need to fulfil requirement 2? .htaccess: Options +FollowSymLinks RewriteEngine On RewriteCond $0 !i18n/en-US [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(i18n)/([^/]+)/(.*)$ $1/en-US/$3 [NC,L]

    Read the article

  • How to Get a Specific Column Value from a DataTable? - C#.NET Winforms

    - by peace
    I have a datatable. I need to fetch a certain column value based on the user input. For example, lets say the datatable has two columns CountryID and CountryName. I need to find CountryID in the datatable based on the user input country name. I could just open a connection with DB and run the query select countryID from Country where countryName = @userinput. Is there anyway i could do this on the datatable. Thanks

    Read the article

  • collation in stored procedure

    - by Sharique
    I have a table which contains data in different languages. All fields are nvarchar(max). I created a stored procedure which trim values of all the fields Create Proc [dbo].[TrimValues] as update testdata set city = dbo.trim(city), state = dbo.trim(state), country = dbo.trim(country), schoolname = dbo.trim(schoolname) after trim all non-english text become ?????

    Read the article

  • Json Traverse Problem, not able to traverse values

    - by Jos
    I m getting the below return from ajax call but not able to traverse it please please help. { "1": { "tel1": null, "status": "1", "fax": "", "tel2": null, "name": "sh_sup1", "country": "Anguilla", "creation_time": "2010-06-02 14:09:40", "created_by": "0", "Id": "85", "fk_location_id": "3893", "address": "Noida", "email": "[email protected]", "website_url": "http://www.noida.in", "srk_main_id": "0" }, "0": { "tel1": "Ahemdabad", "status": "1", "fax": "", "tel2": "Gujrat", "name": "Bharat Petro", "country": "India", "creation_time": "2010-05-31 15:36:53", "created_by": "0", "Id": "82", "fk_location_id": "3874", "address": "THIS is test address", "email": "[email protected]", "website_url": "http://www.bp.com", "srk_main_id": "0" }, "count": 2 }

    Read the article

  • Export data to word from php with the headers on all the pages

    - by udaya
    Hi I am exporting data from php page to word document I received the result in word format but when the data's are in excess number then the header are not available for the consecutive page ex my first page has title Country Name Country uday India akila India my second page has no title such as name and title kiran pakisthan vikie america how to get the titles on the consecutive pagess

    Read the article

  • jstl code issue

    - by theJava
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <style type="text/css"> .even { background-color: silver; } </style> <title>Registration Page</title> </head> <body> <form:form action="add.htm" commandName="user"> <table> <tr> <td>User Name :</td> <td><form:input path="name" /></td> </tr> <tr> <td>Password :</td> <td><form:password path="password" /></td> </tr> <tr> <td>Gender :</td> <td><form:radiobutton path="gender" value="M" label="M" /> <form:radiobutton path="gender" value="F" label="F" /></td> </tr> <tr> <td>Country :</td> <td><form:select path="country"> <form:option value="0" label="Select" /> <form:option value="India" label="India" /> <form:option value="USA" label="USA" /> <form:option value="UK" label="UK" /> </form:select></td> </tr> <tr> <td>About you :</td> <td><form:textarea path="aboutYou" /></td> </tr> <tr> <td>Community :</td> <td><form:checkbox path="community" value="Spring" label="Spring" /> <form:checkbox path="community" value="Hibernate" label="Hibernate" /> <form:checkbox path="community" value="Struts" label="Struts" /></td> </tr> <tr> <td></td> <td><form:checkbox path="mailingList" label="Would you like to join our mailinglist?" /></td> </tr> <tr> <td colspan="2"><input type="submit" value="Register"></td> </tr> </table> </form:form> <c:if test="${fn:length(userList) > 0}"> <table cellpadding="5"> <tr class="even"> <th>Name</th> <th>Gender</th> <th>Country</th> <th>About You</th> </tr> <c:forEach items="${userList}" var="user" varStatus="status"> <tr class="<c:if test="${status.count % 2 == 0}">even</c:if>"> <td>${user.name}</td> <td>${user.gender}</td> <td>${user.country}</td> <td>${user.aboutYou}</td> </tr> </c:forEach> </table> </c:if> </body> </html> When i execute my jsp page, this piece of code does not show up at all. The full source code is below. <c:if test="${fn:length(userList) > 0}"> <table cellpadding="5"> <tr class="even"> <th>Name</th> <th>Gender</th> <th>Country</th> <th>About You</th> </tr> <c:forEach items="${userList}" var="user" varStatus="status"> <tr class="<c:if test="${status.count % 2 == 0}">even</c:if>"> <td>${user.name}</td> <td>${user.gender}</td> <td>${user.country}</td> <td>${user.aboutYou}</td> </tr> </c:forEach> </table> </c:if>

    Read the article

  • How to Get a Specific Column Value from a DataTable?

    - by peace
    I have a datatable. I need to fetch a certain column value based on the user input. For example, lets say the datatable has two columns CountryID and CountryName. I need to find CountryID in the datatable based on the user input country name. I could just open a connection with DB and run the query select countryID from Country where countryName = @userinput. Is there anyway i could do this on the datatable.

    Read the article

  • how to show a UTC time as local time in a webpage

    - by Retrocoder
    I have a database that holds a time as UTC. This time can be shown in a webpage, so I’ve been asked to show it as local time in the page as it can be viewed from any country. A colleague mentioned something about getting the country settings from the current thread but I couldn’t find any details on this. Is what I want to do possible?

    Read the article

  • Rewrite URL based on file existence check

    - by Anthony Faull
    I need to redirect web requests of the form /{language}-{country}/{file} to: /{language}-{country}/{file} if it exists, otherwise /{language}/{file} if it exists, otherwise /en-US/{file} The existing .htaccess fulfils requirements 1 and 3. What changes do I need to fulfil requirement 2? .htaccess: Options +FollowSymLinks RewriteEngine On RewriteCond $0 !i18n/en-US [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(i18n)/([^/]+)/(.*)$ $1/en-US/$3 [NC,L]

    Read the article

  • Creating "GDP in 1960" variable from GDP variables for different years

    - by Tom Smith
    Hi all, I'm pretty new to stata... I have a set of observations of the form "Country GDP Year". I want to create a new variable GDP1960, which gives the GDP in 1960 of each country for each year: USA $100m 1960 USA $100m 1960 $100m USA $200m 1965 --> USA $200m 1965 $100m Canada $60m 1960 Canada $60m 1960 $60m What's the right syntax to make this happen? (I assume egen is involved in some mysterious way)

    Read the article

  • Add Shortcut to Nested Route

    - by wakeless
    I'm using nested routes and I want to provide some sort of a shortcut method. (I'm using RoR 3.0) The routes look like this. resources :countries do resources :regions do resources :wineries end end To access a winery route I want to be able to define a function that removes the need to specify a country and region each time. Like: def winery_path(winery) country_region_winery_path (winery.country, winery.region, winery) end Where should I do this? How can I get that to be available whereever url_for is available?

    Read the article

  • c# list comparer use two compare elements

    - by senzacionale
    private class CompAdvertisements : IComparer<Advertisements> { private string OrderBy { get; set; } public CompAdvertisements(string orderBy) { OrderBy = orderBy; } #region IComparer<Advertisements> Members public int Compare(Advertisements x, Advertisements y) { return x.Country.Name.CompareTo(y.Country.Name); Can i also user x.Name.CompareTo(y.Name); in comparer that i will compare with two elements lik order by something and order by something2

    Read the article

  • All is working except if($_POST['submit']=='Update')

    - by user1319909
    I have a working registration and login system. I am trying to create a form where a user can add product registration info (via mysql update). I can't seem to get the db to actually update the fields. What am I missing here?!? <?php define('INCLUDE_CHECK',true); require 'connect.php'; require 'functions.php'; // Those two files can be included only if INCLUDE_CHECK is defined session_name('tzLogin'); // Starting the session session_set_cookie_params(2*7*24*60*60); // Making the cookie live for 2 weeks session_start(); if($_SESSION['id'] && !isset($_COOKIE['tzRemember']) && !$_SESSION['rememberMe']) { // If you are logged in, but you don't have the tzRemember cookie (browser restart) // and you have not checked the rememberMe checkbox: $_SESSION = array(); session_destroy(); // Destroy the session } if(isset($_GET['logoff'])) { $_SESSION = array(); session_destroy(); header("Location: index_login3.php"); exit; } if($_POST['submit']=='Login') { // Checking whether the Login form has been submitted $err = array(); // Will hold our errors if(!$_POST['username'] || !$_POST['password']) $err[] = 'All the fields must be filled in!'; if(!count($err)) { $_POST['username'] = mysql_real_escape_string($_POST['username']); $_POST['password'] = mysql_real_escape_string($_POST['password']); $_POST['rememberMe'] = (int)$_POST['rememberMe']; // Escaping all input data $row = mysql_fetch_assoc(mysql_query("SELECT * FROM electrix_users WHERE usr='{$_POST['username']}' AND pass='".md5($_POST['password'])."'")); if($row['usr']) { // If everything is OK login $_SESSION['usr']=$row['usr']; $_SESSION['id'] = $row['id']; $_SESSION['email'] = $row['email']; $_SESSION['first'] = $row['first']; $_SESSION['last'] = $row['last']; $_SESSION['address1'] = $row['address1']; $_SESSION['address2'] = $row['address2']; $_SESSION['city'] = $row['city']; $_SESSION['state'] = $row['state']; $_SESSION['zip'] = $row['zip']; $_SESSION['country'] = $row['country']; $_SESSION['product1'] = $row['product1']; $_SESSION['serial1'] = $row['serial1']; $_SESSION['product2'] = $row['product2']; $_SESSION['serial2'] = $row['serial2']; $_SESSION['product3'] = $row['product3']; $_SESSION['serial3'] = $row['serial3']; $_SESSION['rememberMe'] = $_POST['rememberMe']; // Store some data in the session setcookie('tzRemember',$_POST['rememberMe']); } else $err[]='Wrong username and/or password!'; } if($err) $_SESSION['msg']['login-err'] = implode('<br />',$err); // Save the error messages in the session header("Location: index_login3.php"); exit; } else if($_POST['submit']=='Register') { // If the Register form has been submitted $err = array(); if(strlen($_POST['username'])<4 || strlen($_POST['username'])>32) { $err[]='Your username must be between 3 and 32 characters!'; } if(preg_match('/[^a-z0-9\-\_\.]+/i',$_POST['username'])) { $err[]='Your username contains invalid characters!'; } if(!checkEmail($_POST['email'])) { $err[]='Your email is not valid!'; } if(!count($err)) { // If there are no errors $pass = substr(md5($_SERVER['REMOTE_ADDR'].microtime().rand(1,100000)),0,6); // Generate a random password $_POST['email'] = mysql_real_escape_string($_POST['email']); $_POST['username'] = mysql_real_escape_string($_POST['username']); $_POST['first'] = mysql_real_escape_string($_POST['first']); $_POST['last'] = mysql_real_escape_string($_POST['last']); $_POST['address1'] = mysql_real_escape_string($_POST['address1']); $_POST['address2'] = mysql_real_escape_string($_POST['address2']); $_POST['city'] = mysql_real_escape_string($_POST['city']); $_POST['state'] = mysql_real_escape_string($_POST['state']); $_POST['zip'] = mysql_real_escape_string($_POST['zip']); $_POST['country'] = mysql_real_escape_string($_POST['country']); // Escape the input data mysql_query(" INSERT INTO electrix_users(usr,pass,email,first,last,address1,address2,city,state,zip,country,regIP,dt) VALUES( '".$_POST['username']."', '".md5($pass)."', '".$_POST['email']."', '".$_POST['first']."', '".$_POST['last']."', '".$_POST['address1']."', '".$_POST['address2']."', '".$_POST['city']."', '".$_POST['state']."', '".$_POST['zip']."', '".$_POST['country']."', '".$_SERVER['REMOTE_ADDR']."', NOW() )"); if(mysql_affected_rows($link)==1) { send_mail( '[email protected]', $_POST['email'], 'Your New Electrix User Password', 'Thank you for registering at www.electrixpro.com. Your password is: '.$pass); $_SESSION['msg']['reg-success']='We sent you an email with your new password!'; } else $err[]='This username is already taken!'; } if(count($err)) { $_SESSION['msg']['reg-err'] = implode('<br />',$err); } header("Location: index_login3.php"); exit; } if($_POST['submit']=='Update') { { mysql_query(" UPDATE electrix_users(product1,serial1,product2,serial2,product3,serial3) WHERE usr='{$_POST['username']}' VALUES( '".$_POST['product1']."', '".$_POST['serial1']."', '".$_POST['product2']."', '".$_POST['serial2']."', '".$_POST['product3']."', '".$_POST['serial3']."', )"); if(mysql_affected_rows($link)==1) { $_SESSION['msg']['upd-success']='Thank you for registering your Electrix product'; } else $err[]='So Sad!'; } if(count($err)) { $_SESSION['msg']['upd-err'] = implode('<br />',$err); } header("Location: index_login3.php"); exit; } if($_SESSION['msg']) { // The script below shows the sliding panel on page load $script = ' <script type="text/javascript"> $(function(){ $("div#panel").show(); $("#toggle a").toggle(); }); </script>'; } ?>

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >