Search Results

Search found 61 results on 3 pages for 'mouthpiec'.

Page 2/3 | < Previous Page | 1 2 3  | Next Page >

  • MySQL SELECT Statment issue

    - by mouthpiec
    Hi, I have the following query which returns 2 tuples SELECT bar_id, bar_name, town_name, bar_telephone, subscription_type_id, type FROM towns, subscriptiontype, regions, bar LEFT JOIN barpictures bp ON bar.bar_id = bp.bar_id_fk WHERE town_id = town_id_fk AND bar.test_field = 0 AND subscription_type_id = subscription_type_id_fk AND region_id = region_id_fk AND (type like 'logo%' OR type IS NULL) The main difference between the tuples is that one has 'type' = logo and the other tuple has 'type' = logo_large. I need that instead of having two tuples, I need that I have 2 type attributes, one holding the "logo" and the other the "logo_large" eg bar_id, bar_name, town_name, bar_telephone, subscription_type_id, type1, type2 is this possible

    Read the article

  • MYSQL JOIN SELECT Statment - omit duplicated

    - by mouthpiec
    Hi, I am tying to join the following 2 queries but I am having duplicated .... it is possible to remove duplacted fro this: ( SELECT bar_id, bar_name, town_name, bar_telephone, (subscription_type_id *2) AS subscription_type_id FROM bar, sportactivitybar, towns, subscriptiontype WHERE sport_activity_id_fk =14 AND bar_id = bar_id_fk AND town_id = town_id_fk AND subscription_type_id = subscription_type_id_fk ) UNION ( SELECT bar_id, bar_name, town_name, bar_telephone, subscription_type_id FROM bar, towns, subscriptiontype WHERE town_id = town_id_fk AND subscription_type_id = subscription_type_id_fk ) ORDER BY subscription_type_id DESC , RAND( ) Please note that I need to omit those duplicates that will have a lower subscription_type_id

    Read the article

  • What is the best way to have a dynamic dropdownlist in PHP and POST selected value

    - by mouthpiec
    Hi, I am writing the following in PHP: i would like to have 2 dropdownlists, where the second one is populated from a mySQL dB according to the choice made on the first dropdown list. Then I would like to use the values of the selected values of the dropdownlist to call another PHP page in which I will generate a db query. Eg: List A: Car Manufactures (honda, nissan, etc) List B: Models (accord, civic, etc) Then I will have a submit button, to POST the values in another PHP file? (I have the basics of how to perform the above without having a dynamic list, but I tried this with AJAX, but I am having problems to pass the value of the second dropdownlist) Any tips of how I can perform the above?

    Read the article

  • Visual Studio 2008 not detecting Errors while coding

    - by mouthpiec
    Hi, I just installed VS on another PC, but this time, while I am coding, it is not marking syntax errors while I am coding..... I need to press F6 to get the errors. Normally when for example typing the line below, I get 's' underlined saying that there is a mismatch. Any ideas how I can enable this option? string s = 4;

    Read the article

  • MySQL Join issue

    - by mouthpiec
    Hi, I have the following tables: --table sportactivity-- sport_activity_id, home_team_fk, away_team_fk, competition_id_fk, date, time (tuple example) - 1, 33, 41, 5, 2010-04-14, 05:40:00 --table teams-- team_id, team_name (tuple example) - 1, Algeria Now I have the following SQL statment that I use to extract Team A vs Team B SELECT sport_activity_id, T1.team_name AS TeamA, T2.team_name AS TeamB, DATE_FORMAT( DATE, '%d/%m/%Y' ) AS DATE, DATE_FORMAT( TIME, '%H:%i' ) AS TIME FROM sportactivity JOIN teams T1 ON home_team_fk = T1.team_id JOIN teams T2 ON ( away_team_fk = T2.team_id OR away_team_fk = '0' ) WHERE DATE( DATE ) >= CURDATE( ) ORDER BY DATE( DATE ) My problem is that when team B is empty, I am having irrelevant information .... it seems that it is returning all the combinations. I need a query that when team B is equal to 0, (this can occur in my scenario) I get only Team A - Team B (as 0) once.

    Read the article

  • MySQL INSERT Query

    - by mouthpiec
    Hi, I need a query to perform the following: find the countryID where country = 'UK' from table Countries then use the found value in INSERT into towns (id, country_fk, name) values (1, <value_found>, 'London'). is this possible?

    Read the article

  • Reading files in a webservice

    - by mouthpiec
    Hi, I have a webservice, in which I read the settings saved in an xml file. I read the setting by the following command: string dpath = HttpContext.Current.Request.PhysicalApplicationPath.ToString(); XmlTextReader reader = new XmlTextReader(dpath + "Settings.xml"); This is working perfectly when running the application on the localhost, but when I publish the webserver I am getting an error, most probably because the settings are not being loaded. Am I using the right command to read the file ? thanks

    Read the article

  • MySQL - Extracting Time in correct format

    - by mouthpiec
    Hi, I have a table with a coloumn of type "time", and the values in this coloumn are stored as follows: 20:45:00, 18:00:00, etc. Now when displaying the result, I am not getting the minutes, but just 00. I am using the following to get the time: SELECT TIME_FORMAT(time, '%h:%m') as time FROM ......... etc

    Read the article

  • MYSQL Select statment Order By with Group By

    - by mouthpiec
    I have the following simple SQL statment SELECT id, name, value_name, value_id FROM table GROUP BY id ORDER BY value_id DESC when grouping I would like to get the value_name and value_id of the tuple where the value_id is the biggest. The way it is i am getting the smallest value. For example 1, name1, valuename, 3 (where i know that there is a value_id of 5) Can you please help?

    Read the article

  • Show parts of the result of an SQL statement using PHP

    - by mouthpiec
    I have an SQL query which returns a set of data (around 40-50 tuples). I would like to display the results 5 at a time on an HTML page using PHP. I already managed to have the right SELECT statement, but i am having problems to display the results 5 by 5 using a "more" button. Can you please help? Note that every time i call the query, the data is being randomized, so it is not possible to set limits and call the query again. I have to find the method to store the results somewhere, and then show them 5 by 5.

    Read the article

  • Getting Two items from Same table in SELECT statment

    - by mouthpiec
    Hi, I an SQL SELECT statement I need to extract the name of two teams, taking both teams from the same table. Eg Below SELECT sport_activity_id, (team A), (team B), date, time FROM sportactivity, teams WHERE competition_id_fk = 2 For (team A) and (team B) I have an team_id, which is a FK for the table 'teams' Is it possible to get the following result from these tables by SQL? 1, Barcelona, Arsenal, 01/01/2000, 20:00 the two table are the following: table sportactivity sport_activity_id, home_team_fk, away_team_fk, competition_id_fk, date, time (tuple example) - 1, 33, 41, 5, 2010-04-14, 05:40:00 table teams team_id, team_name (tuple example) - 1, Algeria

    Read the article

< Previous Page | 1 2 3  | Next Page >