MySQL query in Xcelsius

Hi Experts,
I need to use MySQL query in Xcelcius.
Please can you tell the steps how to get MySQL query in Xcelcius?
How to insert a mysql query during runtime?
Advance Thanks,
Regards,
BBC
Edited by: BBC Achari on Oct 3, 2011 3:26 PM

Hi Amit,
Here I am trying to use without Universe.
Now I am getting data from MySQL using ODBC connection and I have designed dashboard also. Here I am looking How to insert a MySQL query during runtime?
Please tell me, way to do this.
Regards,
Bala Achari

Similar Messages

  • Conversion of Mysql query in oracle acceptable query format

    Hi
    I have successfully converted my MySql database in oracle. Now the problem is how to execute already written hundreds of Mysql query on the oracle. There are many syntax variation in Mysql query format which is not acceptable for oracle.
    For Example
    Select case_id as 'this is alias' from cases
    The above query can run on Mysql database but have problem while executing Oracle, because single quotes should be replaced with double quotes before executing it on oracle. There are also many other syntax conflicts.
    I have tried to resolve the problem through SwisSQLAPI but problem still exist as SwisSQLAPI is not dealing with all syntax conflict. In my case (select if (expresion, true,false)) must be replace with decode (expression, value,true,false) function of oracle and this conversion is not supported by SwisSQLAPI.
    Please help me in resolving this problem
    Thanks

    The problem with trying to port from one language (mysql SQL) to another (oracle SQL) is that there's generally no hard rules for a computer to follow, that it will get it 100% correct.
    Look at babelfish when you translate a foreign language to English. The end result is readable (usually), but it's rarely completely correct.
    The problem is when you feed something into Oracle SQL, it needs to be 100% correct.
    All you can really do here is rewrite these queries. It shouldn't actually take as long as you think, because 50% of queries will generally need very minor changes you can do in a minute, and 25% won't need any changes at all.

  • Weird problem with mysql query and data table buttons !!!!

    Hi,
    I'm using jsc 2 update 1 on windows and mysql 4.1 . I have a page with a data table. One column of the data table contains "Details" buttons.
    Source query for the table is :
    SELECT tbl_tesserati.idtbl_tesserati idTesserato,
    tbl_tesserati.num_tessera,
    tbl_tesserati.nome,
    tbl_societa.codice_meccanografico
    FROM tbl_tesserati
    INNER JOIN tbl_rel_tesserato_discipline_societa ON tbl_tesserati.idtbl_tesserati = tbl_rel_tesserato_discipline_societa.id_tesserato
    INNER JOIN tbl_cariche ON      tbl_rel_tesserato_discipline_societa.id_carica = tbl_cariche.idtbl_cariche
    INNER JOIN tbl_qualifiche ON      tbl_rel_tesserato_discipline_societa.id_qualifica = tbl_qualifiche.idtbl_qualifiche
    INNER JOIN tbl_discipline ON      tbl_rel_tesserato_discipline_societa.id_disciplina = tbl_discipline.idtbl_discipline
    INNER JOIN tbl_societa ON      tbl_rel_tesserato_discipline_societa.id_societa = tbl_societa.idtbl_societa
    LEFT JOIN tbl_province ON tbl_societa.provincia_sede_sociale = tbl_province.idtbl_province
    LEFT JOIN tbl_comuni ON tbl_societa.comune_sede_sociale = tbl_comuni.idtbl_comuni
    LEFT JOIN tbl_rel_tesserato_discipline_praticate ON tbl_rel_tesserato_discipline_praticate.tessera_id=
    tbl_rel_tesserato_discipline_societa.idtbl_rel_tesserato_discipline
    LEFT JOIN tbl_discipline_praticate ON tbl_discipline_praticate.idtbl_disciplina_praticate=tbl_rel_tesserato_discipline_praticate.disciplina_praticata_id
    WHERE
    tbl_tesserati.cognome LIKE ?
    AND tbl_tesserati.nome LIKE ?
    AND tbl_rel_tesserato_discipline_societa.id_societa LIKE ?
    AND tbl_tesserati.idtbl_tesserati LIKE ?
    AND tbl_cariche.idtbl_cariche LIKE ?
    AND tbl_qualifiche.idtbl_qualifiche LIKE ?
    AND tbl_tesserati.data_nascita >= ?
    AND tbl_tesserati.data_nascita<= ?
    AND tbl_discipline.idtbl_discipline LIKE ?
    AND codice_affiliazione LIKE ?
    AND tbl_societa.denominazione LIKE ?
    AND YEAR(tbl_rel_tesserato_discipline_societa.data_scadenza) LIKE ?
    AND (tbl_province.nome LIKE ? OR tbl_province.nome IS NULL)
    AND ( tbl_comuni.nome LIKE ? OR tbl_comuni.nome IS NULL)
    The tbl_tesserati.data_nascita is a mysql date field.
    The click event handler code for the "Details" Button is:
    public String btnModificaTesserato_action() {
            try{
                TableRowDataProvider rowData= (TableRowDataProvider)getBean("currentRowTesserati");
                getRequestBean1().setId_tesserato((Long)rowData.getValue("idTesserato"));          
            } catch(Exception ex) {
                log("errore nella query",ex);
            return "dettaglioTesseratoSocieta";
        }When i run the project and open the page the table is correctly rendered and populated with some rows. But when i click on details button nothing happens, the page is simply reloaded.
    If i set a breakpoint in the code line   TableRowDataProvider rowData= (TableRowDataProvider)getBean("currentRowTesserati");the debbuger does not stop the code execution ! As if the button was never clicked!
    I tried to modify the source query to :
    SELECT tbl_tesserati.idtbl_tesserati idTesserato,
    tbl_tesserati.num_tessera,
    tbl_tesserati.nome,
    tbl_societa.codice_meccanografico
    FROM tbl_tesserati
    INNER JOIN tbl_rel_tesserato_discipline_societa ON tbl_tesserati.idtbl_tesserati = tbl_rel_tesserato_discipline_societa.id_tesserato
    INNER JOIN tbl_cariche ON      tbl_rel_tesserato_discipline_societa.id_carica = tbl_cariche.idtbl_cariche
    INNER JOIN tbl_qualifiche ON      tbl_rel_tesserato_discipline_societa.id_qualifica = tbl_qualifiche.idtbl_qualifiche
    INNER JOIN tbl_discipline ON      tbl_rel_tesserato_discipline_societa.id_disciplina = tbl_discipline.idtbl_discipline
    INNER JOIN tbl_societa ON      tbl_rel_tesserato_discipline_societa.id_societa = tbl_societa.idtbl_societa
    LEFT JOIN tbl_province ON tbl_societa.provincia_sede_sociale = tbl_province.idtbl_province
    LEFT JOIN tbl_comuni ON tbl_societa.comune_sede_sociale = tbl_comuni.idtbl_comuni
    LEFT JOIN tbl_rel_tesserato_discipline_praticate ON tbl_rel_tesserato_discipline_praticate.tessera_id=
    tbl_rel_tesserato_discipline_societa.idtbl_rel_tesserato_discipline
    LEFT JOIN tbl_discipline_praticate ON tbl_discipline_praticate.idtbl_disciplina_praticate=tbl_rel_tesserato_discipline_praticate.disciplina_praticata_id
    WHERE
    tbl_tesserati.cognome LIKE ?
    AND tbl_tesserati.nome LIKE ?
    AND tbl_rel_tesserato_discipline_societa.id_societa LIKE ?
    AND tbl_tesserati.idtbl_tesserati LIKE ?
    AND tbl_cariche.idtbl_cariche LIKE ?
    AND tbl_qualifiche.idtbl_qualifiche LIKE ?
    AND tbl_tesserati.data_nascita >= ?
    OR tbl_tesserati.data_nascita<= ?
    AND tbl_discipline.idtbl_discipline LIKE ?
    AND codice_affiliazione LIKE ?
    AND tbl_societa.denominazione LIKE ?
    AND YEAR(tbl_rel_tesserato_discipline_societa.data_scadenza) LIKE ?
    AND (tbl_province.nome LIKE ? OR tbl_province.nome IS NULL)
    AND ( tbl_comuni.nome LIKE ? OR tbl_comuni.nome IS NULL)
    Using this query everything works well !! The click handler works and the debugger too !!
    I changed only the AND in OR !!!
    I also tried to change mysql-x-x-connector driver but without solving my problem.
    Can someone help me ?
    Thanks
    Giorgio

    You'll find that it is more to do with the way MySql deals with dates than anything else! Depending on how your date field is setup, then try using a BETWEEN statement for those 2 lines in your first query e.g.
    AND ( tbl_tesserati.data_nascita BETWEEN ? AND ?)
    The date column needs to be in the ISO format to work. If you examine your second query output, you might discover that the output is only going to refer to one parameter (probably the OR one). Did you manage to view the output logs from the application server? You would have got an idea from there with a message like stating a conversion error'.
    Alternatively, you could try using the to_days() function and convert it directly to a number which would be a lot easier to deal with. For example:
    AND to_days(tbl_tesserati.data_nascita >= ? )
    AND to_days( tbl_tesserati.data_nascita<= ? )
    Or try the BETWEEN version with to_days() and see what you get.
    More info about date formatting (v5) here:
    http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_to-days
    Before I forget, sometimes you may need to treat dates as Strings rather 'Long' as you did.
    As a matter of interest, did you try your query in a different piece of software?
    If my queries are a little more complicated, I tend to try MySql queries out in the free MySql query browser and also double check in another to verify certain issues. I found it easier to develop SQL in a seperate program then import the final version to JSC making the required modifications for parameters.
    Message was edited by:
    aerostra

  • Only firefox executing mysql query two times. but other browser works perfect why?

    i am a web developer. and i am facing a problem only with firefox. every time i use MySQL query in my php code fire fox execute it two times. but same query is working fine on other browsers.

    Yes, the problem is seen without extensions and also in safe mode.
    But, I am starting to think that firefox is running low on memeory or CPU.
    Without extensions the possibility of failing is 1 in 3.
    I am still unable to explain why closing the browser or aborting the request can cause the stuck request to immediately reach the server.
    Is there a way to collect Firefox logs and post it here ?

  • Counting rows in a mysql query

    Hey
    How do i count the rows in a mysql query?
    I have tried to make a while loop (as you can see in the code), but if i make this while loop i cant use the same query to get the database data.
    Doesnt java have a function that counts the rows?
    public DefaultTableModel searchCategory(String searchString){
            String returnString = "";
            try{
                RS = connection.executeQuery("SELECT name, price, products_type_id FROM katrinelund_products WHERE products_type_id = (SELECT products_type_id FROM katrinelund_products_type WHERE name LIKE '%"+searchString+"%')");
                int rowCount = 0;
                while(RS.next()){
                    rowCount++;
                String[] columnNames = {"Navn", "Pris", "Produkt type"};
                Object[][] data = new Object[rowCount][columnNames.length];
                int i=0;
                while(RS.next()){
                    data[0] = RS.getString(1);
    data[i][1] = RS.getString(2);
    data[i][2] = RS.getString(3);
    i++;
    table = new DefaultTableModel(data, columnNames);
    catch(SQLException E){
    System.out.println("Der skete en fejl" + E.getMessage());
    return table;
    }NOTE: the connection to the database is stored in the connection variable.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    yawmark wrote:
    The SELECT COUNT(*) cannot be fetched among other data, so in this case you must send two queries. Then there is much simplier to use the method I mentioned above.While it may be "simpler", it's not supported in a non-trivial number of drivers. So there are a number of situations in which your "simple" solution will not work. I assume you've been fortunate enough to work only with drivers that do support the functionality you recommend, but I can also only assume that you haven't had much experience beyond that.I apologize for my spelling errors. I'm not a native englishman.
    yawmark wrote:
    Knowing the amount of rows a resultset returns can be interesting if you're making some kind of search engine. Knowing the amount of data returned for a particular query can certainly be useful, and we've presented some reasonable means of obtaining that kind of information that don't rely on potentially unsupported features.
    I don't now about unsupported features. The ResultSet is (as far as I know) not tied to a specific SQL database. This, and all of it's methods is in the java.sql.ResultSet interface. Then all classes implementing this must have these methods. Am I not right?
    yawmark wrote:
    Stop dealing with however it's necessary or not.Sorry, partner, but you don't get to decide what I post here.
    This guy wants this problem to be solved, so apparentley he has a usage for it...And what you're apparently failing notice is that there are other solutions (better, in many cases) than the solution which you posted. Don't make the mistake of thinking your suggestion is golden. It isn't. Besides, there are no shortage of beginners that want the "problem" of i = i++ to be "solved"; no doubt they think they have an apparent usage for it, too. ~I'm well aware of that you decide on your own what to post. I just don't see how it is necessary to discuss the matter of necessity in this case. The problem still remains.
    I don't want any fuss here. I'm just so sick of everyone who yells "you don't need to know that". I haven't decried any of the other solutions (at least it wasn't my point), all I said was that it's not a good idea to send multiple queries to the database when you already have the answer three rows of code away. In some rare situations, the data may have been changed during the short period of time as the database is finished with the first query before you send the next one.

  • Trouble Compiling mysql-query-browser

    After building all of the necesary prerequsites I am trying to compile mysql-query-browser on Solaris 10 (x86). I am getting some errors (shown below) when I run the configure script for the mysql-gui-common components. Can anyone tell me how I might fix these errors?
    ---configure output---
    checking for a BSD-compatible install... /opt/sfw/bin/ginstall -c
    checking whether build environment is sane... yes
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking build system type... i386-pc-solaris2.10
    checking host system type... i386-pc-solaris2.10
    checking for gcc... gcc
    checking for C compiler default output... a.out
    checking whether the C compiler works... yes
    checking whether we are cross compiling... no
    checking for suffix of executables...
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ANSI C... none needed
    checking for style of include used by make... GNU
    checking dependency style of gcc... gcc3
    checking for g++... g++
    checking whether we are using the GNU C++ compiler... yes
    checking whether g++ accepts -g... yes
    checking dependency style of g++... gcc3
    checking for ranlib... ranlib
    checking for pkg-config... /usr/bin/pkg-config
    checking for glib-2.0 libxml-2.0 >= 2.6.2... yes
    checking GLIB_CFLAGS... -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/include/libxml2
    checking GLIB_LIBS... -L/usr/local/lib -lglib-2.0 -lxml2 -lpthread -lz -lm -lsocket -lnsl
    checking for gthread-2.0 libxml-2.0 >= 2.6.2... yes
    checking GTHREAD_CFLAGS... -threads -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/include/libxml2
    checking GTHREAD_LIBS... -threads -L/usr/local/lib -lgthread-2.0 -lglib-2.0 -lxml2 -lpthread -lz -lm -lsocket -lnsl
    checking for gtk+-2.0... yes
    checking GTK_CFLAGS... -I/usr/local/include/gtk-2.0 -I/usr/local/lib/gtk-2.0/include -I/usr/local/include/atk-1.0 -I/usr/local/include/pango-1.0 -I/usr/openwin/include -I/usr/sfw/include -I/usr/sfw/include/freetype2 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include
    checking GTK_LIBS... -L/usr/local/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0
    checking for libglade-2.0 gtkmm-2.0... yes
    checking GNOME_CFLAGS... -I/usr/local/include/gtk-2.0 -I/usr/local/lib/gtk-2.0/include -I/usr/local/include/atk-1.0 -I/usr/local/include/pango-1.0 -I/usr/openwin/include -I/usr/sfw/include -I/usr/sfw/include/freetype2 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/gtkmm-2.0 -I/usr/local/lib/gtkmm-2.0/include -I/usr/local/lib/sigc++-1.2/include -I/usr/local/include/sigc++-1.2 -I/usr/include/libglade-2.0 -I/usr/include/libxml2
    checking GNOME_LIBS... -L/usr/local/lib -lglade-2.0 -lxml2 -lpthread -lz -lsocket -lnsl -lgtkmm-2.0 -lgdkmm-2.0 -latkmm-1.0 -lgtk-x11-2.0 -lpangomm-1.0 -lglibmm-2.0 -lsigc-1.2 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0
    checking for mysql_config... -I'/usr/sfw/include/mysql'
    checking for mysql_config... Usage: /usr/sfw/bin/mysql_config [OPTIONS]
    Options:
    --cflags         [-I'/usr/sfw/include/mysql']
    --libs           [-R/usr/sfw/lib -R/usr/sfw/lib/mysql -L/usr/sfw/lib -L'/usr/sfw/lib/mysql' -lmysqlclient -lz -lposix4 -lcrypt -lgen -lsocket -lnsl -lm] --socket         [tmp/mysql.sock]
    --port           [3306]
    --version        [4.0.15]
    --libmysqld-libs [-R/usr/sfw/lib -R/usr/sfw/lib/mysql -L/usr/sfw/lib -L'/usr/sfw/lib/mysql' -lmysqld -lpthread -lz -lposix4 -lcrypt -lgen -lsocket -lnsl -lm  -lpthread  -lrt]
    checking for pcre-config... yes
    checking for pcre-config... -L/opt/sfw/lib -lpcre
    configure: creating ./config.status
    config.status: creating Makefile
    sed: command garbled: s,@MYSQL_LIBS@,Usage: /usr/sfw/bin/mysql_config [OPTIONS]
    config.status: creating library/Makefile
    sed: command garbled: s,@MYSQL_LIBS@,Usage: /usr/sfw/bin/mysql_config [OPTIONS]
    config.status: creating library/source/Makefile
    sed: command garbled: s,@MYSQL_LIBS@,Usage: /usr/sfw/bin/mysql_config [OPTIONS]
    config.status: creating library_grt/Makefile
    sed: command garbled: s,@MYSQL_LIBS@,Usage: /usr/sfw/bin/mysql_config [OPTIONS]
    config.status: creating library_grt/source/Makefile
    sed: command garbled: s,@MYSQL_LIBS@,Usage: /usr/sfw/bin/mysql_config [OPTIONS]
    config.status: creating library_grt_modules/Makefile
    sed: command garbled: s,@MYSQL_LIBS@,Usage: /usr/sfw/bin/mysql_config [OPTIONS]
    config.status: creating library_grt_modules/source/Makefile
    sed: command garbled: s,@MYSQL_LIBS@,Usage: /usr/sfw/bin/mysql_config [OPTIONS]
    config.status: creating library_gc/Makefile
    sed: command garbled: s,@MYSQL_LIBS@,Usage: /usr/sfw/bin/mysql_config [OPTIONS]
    config.status: creating library_gc/source/Makefile
    sed: command garbled: s,@MYSQL_LIBS@,Usage: /usr/sfw/bin/mysql_config [OPTIONS]
    config.status: creating source/Makefile
    sed: command garbled: s,@MYSQL_LIBS@,Usage: /usr/sfw/bin/mysql_config [OPTIONS]
    config.status: creating source/grtsh/Makefile
    sed: command garbled: s,@MYSQL_LIBS@,Usage: /usr/sfw/bin/mysql_config [OPTIONS]
    config.status: creating source/linux/Makefile
    sed: command garbled: s,@MYSQL_LIBS@,Usage: /usr/sfw/bin/mysql_config [OPTIONS]
    config.status: creating source/linux/canvas/Makefile
    sed: command garbled: s,@MYSQL_LIBS@,Usage: /usr/sfw/bin/mysql_config [OPTIONS]
    config.status: creating images/Makefile
    sed: command garbled: s,@MYSQL_LIBS@,Usage: /usr/sfw/bin/mysql_config [OPTIONS]
    config.status: creating images/png/Makefile
    sed: command garbled: s,@MYSQL_LIBS@,Usage: /usr/sfw/bin/mysql_config [OPTIONS]
    config.status: creating images/icons/Makefile
    sed: command garbled: s,@MYSQL_LIBS@,Usage: /usr/sfw/bin/mysql_config [OPTIONS]
    config.status: creating images/icons/png/Makefile
    sed: command garbled: s,@MYSQL_LIBS@,Usage: /usr/sfw/bin/mysql_config [OPTIONS]
    config.status: creating res/Makefile
    sed: command garbled: s,@MYSQL_LIBS@,Usage: /usr/sfw/bin/mysql_config [OPTIONS]
    config.status: creating res/linux/Makefile
    sed: command garbled: s,@MYSQL_LIBS@,Usage: /usr/sfw/bin/mysql_config [OPTIONS]
    config.status: creating library/tests/Makefile
    sed: command garbled: s,@MYSQL_LIBS@,Usage: /usr/sfw/bin/mysql_config [OPTIONS]
    config.status: creating library/tests/read_international/Makefile
    sed: command garbled: s,@MYSQL_LIBS@,Usage: /usr/sfw/bin/mysql_config [OPTIONS]
    config.status: creating library/tests/test_detect_charset/Makefile
    sed: command garbled: s,@MYSQL_LIBS@,Usage: /usr/sfw/bin/mysql_config [OPTIONS]
    config.status: creating library/tests/test_mysql_api/Makefile
    sed: command garbled: s,@MYSQL_LIBS@,Usage: /usr/sfw/bin/mysql_config [OPTIONS]
    config.status: creating library/tests/test_parse_sql_statemets/Makefile
    sed: command garbled: s,@MYSQL_LIBS@,Usage: /usr/sfw/bin/mysql_config [OPTIONS]
    config.status: creating library/tests/test_translations/Makefile
    sed: command garbled: s,@MYSQL_LIBS@,Usage: /usr/sfw/bin/mysql_config [OPTIONS]
    config.status: creating library/tests/test_xml/Makefile
    sed: command garbled: s,@MYSQL_LIBS@,Usage: /usr/sfw/bin/mysql_config [OPTIONS]
    config.status: executing depfiles commands

    I agree that it is entirely possible that the problem lies with mySQL and not Sun, however the query I posted on their forums is sitting in deathly silence so I'm now trying elsewhere.
    After making the change you mentioned it configures clean but it doesn't buil properly afterward, I presume this is the same for you.

  • [SLVD] MySQL Query Browser (1.2.12) hangs when changing schma/database

    After a rather big upgrade yesterday (see paste below) I have got a problem with MySQL query browser which is found in package mysql-gui-tools. Everything else seems to be okay, but after upgrading mysql-gui-tools from 5.0r12-3 to 5.0r14-1 (..and now, after another update, its at 5.0r14-2) it is no longer able to refresh schema/databases. Every time I try to change/refresh schema in the schema menu to the right the program hangs and I have to kill it. A refresh icon appears as normal to the left of the schema I'm trying to refresh, but that icon too has frozen. I am however able to execute normal SELECT queries etc if I write the full "path" to the table in the SQL query, but when I try a USE query the same thing happens.
    I have done some searching on the Internet about this and found this thread to be interesting. Too bad it's from July 2007..
    I tried to downgrade to the old version of query browser, but then I got this problem:
    /usr/bin/mysql-query-browser-bin: error while loading shared libraries: libmysqlclient_r.so.15: cannot open shared object file: No such file or directory
    ..So I guess theres a dependency problem here with the old version.
    Has anyone else got any problem with the MySQL Query Browser after upgrade or has any ideas for a solution?
    Log from pacman:
    [2009-04-12 13:52] synchronizing package lists
    [2009-04-12 13:52] starting full system upgrade
    [2009-04-12 13:55] upgraded xf86-input-evdev (2.1.2-1 -> 2.2.1-1)
    [2009-04-12 13:55] upgraded xorg-server (1.5.3-5 -> 1.6.0-3)
    [2009-04-12 13:56] synchronizing package lists
    [2009-04-12 13:56] starting full system upgrade
    [2009-04-12 13:56] upgraded glib2 (2.20.0-1 -> 2.20.1-1)
    [2009-04-12 13:56] upgraded libcap (1.10-2 -> 2.16-3)
    [2009-04-12 13:56] upgraded avahi (0.6.24-1 -> 0.6.24-3)
    [2009-04-12 13:56] upgraded cdrkit (1.1.9-1 -> 1.1.9-2)
    [2009-04-12 13:56]
    [2009-04-12 13:56] >>> Deluge's daemon is running with the "deluge" user. The default download directory is /srv/deluge/
    [2009-04-12 13:56]
    [2009-04-12 13:56] upgraded deluge (1.1.5-1 -> 1.1.6-3)
    [2009-04-12 13:56] upgraded jack-audio-connection-kit (0.109.2-2 -> 0.116.2-1)
    [2009-04-12 13:56] upgraded gstreamer0.10-bad-plugins (0.10.11-2 -> 0.10.11-3)
    [2009-04-12 13:56] upgraded hdparm (9.12-1 -> 9.14-1)
    [2009-04-12 13:56] upgraded iptables (1.4.2-1 -> 1.4.3.1-1)
    [2009-04-12 13:56] upgraded kbproto (1.0.3-1 -> 1.0.3-2)
    [2009-04-12 13:57] upgraded kdelibs (4.2.2-3 -> 4.2.2-4)
    [2009-04-12 13:57] upgraded kernel26-firmware (2.6.28-1 -> 2.6.29-1)
    [2009-04-12 13:59] >>> Updating module dependencies. Please wait ...
    [2009-04-12 13:59] >>> MKINITCPIO SETUP
    [2009-04-12 13:59] >>> ----------------
    [2009-04-12 13:59] >>> If you use LVM2, Encrypted root or software RAID,
    [2009-04-12 13:59] >>> Ensure you enable support in /etc/mkinitcpio.conf .
    [2009-04-12 13:59] >>> More information about mkinitcpio setup can be found here:
    [2009-04-12 13:59] >>> http://wiki.archlinux.org/index.php/Mkinitcpio
    [2009-04-12 13:59]
    [2009-04-12 13:59] >>> Generating initial ramdisk, using mkinitcpio. Please wait...
    [2009-04-12 13:59] ==> Building image "default"
    [2009-04-12 13:59] ==> Running command: /sbin/mkinitcpio -k 2.6.29-ARCH -c /etc/mkinitcpio.conf -g /boot/kernel26.img
    [2009-04-12 13:59] :: Begin dry run
    [2009-04-12 13:59] :: Parsing hook [base]
    [2009-04-12 13:59] :: Parsing hook [udev]
    [2009-04-12 13:59] :: Parsing hook [autodetect]
    [2009-04-12 13:59] :: Parsing hook [pata]
    [2009-04-12 13:59] :: Parsing hook [scsi]
    [2009-04-12 13:59] :: Parsing hook [sata]
    [2009-04-12 13:59] :: Parsing hook [usbinput]
    [2009-04-12 13:59] :: Parsing hook [keymap]
    [2009-04-12 13:59] :: Parsing hook [filesystems]
    [2009-04-12 13:59] :: Generating module dependencies
    [2009-04-12 13:59] :: Generating image '/boot/kernel26.img'...SUCCESS
    [2009-04-12 13:59] ==> SUCCESS
    [2009-04-12 13:59] ==> Building image "fallback"
    [2009-04-12 13:59] ==> Running command: /sbin/mkinitcpio -k 2.6.29-ARCH -c /etc/mkinitcpio.conf -g /boot/kernel26-fallback.img -S autodetect
    [2009-04-12 13:59] :: Begin dry run
    [2009-04-12 13:59] :: Parsing hook [base]
    [2009-04-12 13:59] :: Parsing hook [udev]
    [2009-04-12 13:59] :: Parsing hook [pata]
    [2009-04-12 13:59] :: Parsing hook [scsi]
    [2009-04-12 13:59] :: Parsing hook [sata]
    [2009-04-12 13:59] :: Parsing hook [usbinput]
    [2009-04-12 13:59] :: Parsing hook [keymap]
    [2009-04-12 13:59] :: Parsing hook [filesystems]
    [2009-04-12 13:59] :: Generating module dependencies
    [2009-04-12 14:00] :: Generating image '/boot/kernel26-fallback.img'...SUCCESS
    [2009-04-12 14:00] ==> SUCCESS
    [2009-04-12 14:00] upgraded kernel26 (2.6.28.8-1 -> 2.6.29.1-3)
    [2009-04-12 14:00] upgraded klibc-udev (140-1 -> 141-1)
    [2009-04-12 14:00] upgraded libavc1394 (0.5.3-1 -> 0.5.3-2)
    [2009-04-12 14:00] upgraded libcddb (1.3.0-3 -> 1.3.2-1)
    [2009-04-12 14:00] upgraded libdatrie (0.1.2-1 -> 0.2.1-1)
    [2009-04-12 14:00] upgraded libdrm (2.3.1-3 -> 2.4.9-1)
    [2009-04-12 14:00] upgraded libdvdread (0.9.7-1 -> 0.9.7-2)
    [2009-04-12 14:00] upgraded libfontenc (1.0.4-1 -> 1.0.4-2)
    [2009-04-12 14:00] upgraded libid3tag (0.15.1b-2 -> 0.15.1b-3)
    [2009-04-12 14:00] upgraded libmatroska (0.8.1-1 -> 0.8.1-2)
    [2009-04-12 14:00] upgraded libmpd (0.16.1-1 -> 0.18.0-1)
    [2009-04-12 14:00] upgraded libmysqlclient (5.0.77-1 -> 5.1.33-1)
    [2009-04-12 14:00] upgraded libogg (1.1.3-1 -> 1.1.3-2)
    [2009-04-12 14:00] upgraded libsamplerate (0.1.6-1 -> 0.1.7-1)
    [2009-04-12 14:00] upgraded libthai (0.1.9-1 -> 0.1.11-1)
    [2009-04-12 14:00] upgraded libx11 (1.2-1 -> 1.2.1-1)
    [2009-04-12 14:00] installed libftdi (0.15-1)
    [2009-04-12 14:00] upgraded lirc-utils (0.8.4-1 -> 0.8.5pre2-1)
    [2009-04-12 14:00] upgraded m4 (1.4.12-1 -> 1.4.13-1)
    [2009-04-12 14:00] upgraded man-db (2.5.4-2 -> 2.5.5-1)
    [2009-04-12 14:00] upgraded man-pages (3.19-1 -> 3.20-1)
    [2009-04-12 14:00] upgraded nvidia-utils (180.29-3 -> 180.44-1)
    [2009-04-12 14:00] installed dri2proto (1.99.3-1)
    [2009-04-12 14:01] upgraded mesa (7.2-1 -> 7.4-1)
    [2009-04-12 14:01] upgraded mpfr (2.3.2-2 -> 2.4.1-1)
    [2009-04-12 14:01] upgraded mpg123 (1.7.1-4 -> 1.7.2-1)
    [2009-04-12 14:01] upgraded mysql-clients (5.0.77-1 -> 5.1.33-1)
    [2009-04-12 14:01] upgraded mysql (5.0.77-3 -> 5.1.33-1)
    [2009-04-12 14:01] upgraded mysql-gui-tools (5.0r12-3 -> 5.0r14-1)
    [2009-04-12 14:01] In order to use the new nvidia module, exit Xserver and unload it manually.
    [2009-04-12 14:01] upgraded nvidia (180.29-3 -> 180.44-1)
    [2009-04-12 14:01] warning: /etc/pacman.d/mirrorlist installed as /etc/pacman.d/mirrorlist.pacnew
    [2009-04-12 14:01] upgraded pacman-mirrorlist (20090108-1 -> 20090405-1)
    [2009-04-12 14:01] upgraded pango (1.24.0-1 -> 1.24.0-2)
    [2009-04-12 14:01] upgraded php (5.2.9-2 -> 5.2.9-3)
    [2009-04-12 14:01] upgraded pm-utils (1.2.4-3 -> 1.2.5-1)
    [2009-04-12 14:01] installed perl-xyne-common (0.01-5)
    [2009-04-12 14:01] installed perl-html-tagset (3.20-1)
    [2009-04-12 14:01] installed perl-html-parser (3.60-1)
    [2009-04-12 14:01] installed perl-libwww (5.825-1)
    [2009-04-12 14:01] installed perl-xyne-arch (0.03-5)
    [2009-04-12 14:01] ######################
    [2009-04-12 14:01] ## IMPORTANT NOTICE ##
    [2009-04-12 14:01] ######################
    [2009-04-12 14:01] Powerpill options and configuration file syntax have changed with
    [2009-04-12 14:01] version 16.0. Please remove old configuration files and use the
    [2009-04-12 14:01] default configuration file at /etc/powerpill.conf as a template for new
    [2009-04-12 14:01] ones. Please see the man page for information on the command-line options.
    [2009-04-12 14:01] upgraded powerpill (15.12-1 -> 16.0-5)
    [2009-04-12 14:01] upgraded python-numpy (1.2.1-4 -> 1.3.0-1)
    [2009-04-12 14:02] upgraded qt (4.5.0-3 -> 4.5.0-4)
    [2009-04-12 14:02] upgraded qt3 (3.3.8-9 -> 3.3.8-10)
    [2009-04-12 14:02] upgraded redland (1.0.8-1 -> 1.0.8-3)
    [2009-04-12 14:02] upgraded tdb (3.3.1-1 -> 3.3.3-1)
    [2009-04-12 14:02] upgraded smbclient (3.3.1-1 -> 3.3.3-1)
    [2009-04-12 14:02] upgraded subversion (1.6.0-2 -> 1.6.1-2)
    [2009-04-12 14:02] upgraded syslog-ng (3.0.1-4 -> 3.0.1-6)
    [2009-04-12 14:02] upgraded tzdata (2009d-1 -> 2009e-1)
    [2009-04-12 14:02] upgraded udev (140-2 -> 141-1)
    [2009-04-12 14:02] upgraded xf86-input-keyboard (1.3.2-1 -> 1.3.2-2)
    [2009-04-12 14:02] upgraded xf86-input-mouse (1.3.0-1 -> 1.4.0-2)
    [2009-04-12 14:02] upgraded xf86-video-vesa (2.1.0-1 -> 2.2.0-1)
    [2009-04-12 14:02] upgraded xfce4-mpc-plugin (0.3.3-2 -> 0.3.3-3)
    [2009-04-12 14:02] upgraded xorg-server-utils (7.4-3 -> 7.4-4)
    [2009-04-12 14:02] upgraded xorg-utils (7.4-2 -> 7.4-3)
    Last edited by siaco (2009-04-14 21:42:10)

    I found the error on this. In the current PGKBUILD found in AUR, the patch mysql-gui-tools.chema_change_freeze_bug.patch is no longer applied.
    I downloaded all related files to this package and built it myself now, with some changes to PGKBUILD and the mysql-gui-tools.chema_change_freeze_bug.patch. It works again :-)
    New PGKBUILD:
    # $Id: PKGBUILD,v 1.14 2009/04/12 11:52:45 dsa Exp $
    # Maintainer: Douglas Soares de Andrade <[email protected]>
    # Contributor: Vinay S Shastry <[email protected]>
    pkgname=mysql-gui-tools
    pkgver=5.0r14
    pkgrel=2
    arch=('i686' 'x86_64')
    pkgdesc="Set of programs to manage and interact with a MySQL server."
    url="http://www.mysql.com/products/tools/"
    license=('GPL')
    source=(http://mirrors.uol.com.br/pub/mysql/Downloads/MySQLGUITools/$pkgname-$pkgver.tar.gz
    bad-char.patch
    mysql-gui-tools-sigc_2.1.1_api_fixes.diff
    mysql-gui-tools-5.0_p12-deprecated-gtk+-api.patch
    mysql-gui-tools-gcc43.patch
    mysql-gui-tools.chema_change_freeze_bug.patch)
    depends=('gtkmm' 'gtkhtml' 'libmysqlclient' 'pcre')
    replaces=('mysql-administrator' 'mysql-query-browser')
    conflicts=('mysql-administrator' 'mysql-query-browser')
    provides=('mysql-gui-common' 'mysql-administrator' 'mysql-query-browser')
    makedepends=('pkgconfig' 'lua' 'libxml2' 'libgnomeprint')
    options=('!makeflags')
    build() {
    cd $startdir/src/$pkgname-$pkgver
    # Patch from mysql.com to fix the freeze when selecting a schema
    patch -p1 < ../mysql-gui-tools.chema_change_freeze_bug.patch || return 1
    # Patch to make 5.0r14 compile
    patch -Np1 < $startdir/src/bad-char.patch
    patch -Np1 < $startdir/src/mysql-gui-tools-sigc_2.1.1_api_fixes.diff
    patch -Np1 < $startdir/src/mysql-gui-tools-gcc43.patch
    patch -Np0 < $startdir/src/mysql-gui-tools-5.0_p12-deprecated-gtk+-api.patch
    cd $startdir/src/$pkgname-$pkgver/common
    sh autogen.sh
    ./configure --prefix=/usr --datarootdir=/usr/share --with-gtkhtml=libgtkhtml-3.14 || return 1
    make || return 1
    make DESTDIR=$startdir/pkg install || return 1
    cd ..
    cp -R common mysql-gui-common
    cd $startdir/src/$pkgname-$pkgver/administrator
    sh autogen.sh
    ./configure --prefix=/usr --datarootdir=/usr/share --with-gtkhtml=libgtkhtml-3.14 || return 1
    make || return 1
    make DESTDIR=$startdir/pkg install || return 1
    cd $startdir/src/$pkgname-$pkgver/query-browser
    sh autogen.sh
    ./configure --prefix=/usr --datarootdir=/usr/share --with-gtkhtml=libgtkhtml-3.14 || return 1
    make CFLAGS="${CFLAGS} -D_GNU_SOURCE" || return 1
    make DESTDIR=$startdir/pkg install || return 1
    #cd $startdir/src/$pkgname-$pkgver/mysql-workbench
    #patch -p1 < ../../mysql-gui-tools-5.0_p12-workbench-lua.patch
    #./configure --prefix=/usr --with-gtkhtml=libgtkhtml-3.14 || return 1
    #make || return 1
    #make DESTDIR=$startdir/pkg install
    # Some adjusts to make mysql-workbench run
    #cd $startdir/pkg/usr/bin
    #mv mysql-workbench mysql-wb
    #mv mysql-workbench-bin mysql-wb-bin
    #install -m755 $startdir/src/mysql-workbench.sh mysql-workbench
    #rm -rf $startdir/pkg/usr/lib/
    # Fixed startup scripts
    install -m755 $startdir/mysql-administrator $pkgdir/usr/bin
    install -m755 $startdir/mysql-query-browser $pkgdir/usr/bin
    md5sums=('b8efefbf20b7264c8f3afd34424467d7'
    '4279c75bb5e6c2bfcb16c98817d55b80'
    '4625629385142862cd01d37f814d5e80'
    '33205d45329ab4fa4096b6b298a60b2c'
    '1368384dac87bc0a64adb774ab2e6cbd'
    '2ff840932405f7a6a6863f633a639fe9')
    New mysql-gui-tools.chema_change_freeze_bug.patch: (only changes to paths in file. Don't know if this was really needed, but I belive so.)
    diff -ruN mysql-gui-tools-5.0r11.ORIG/query-browser/source/linux/MQQueryDispatcher.cc mysql-gui-tools-5.0r11/query-browser/source/linux/MQQueryDispatcher.cc
    --- mysql-gui-tools-5.0r11.ORIG/query-browser/source/linux/MQQueryDispatcher.cc 2007-02-21 01:31:19.000000000 +0000
    +++ mysql-gui-tools-5.0r11/query-browser/source/linux/MQQueryDispatcher.cc 2007-11-09 15:31:38.000000000 +0000
    @@ -558,8 +558,8 @@
    Gtk::Main::instance()->run();
    - while(!req->is_complete())
    +// while(!req->is_complete())
    +// ;
    return sps;
    I hope this helps anyone else who needs to fix this!

  • Help with mysql query plz anyone i am begging!!!

    Hi everyone pls forgive me i am new to java. can someone pls tel me where i am going wrong wit this mysql query?
    <sql:query var="parish" maxRows="1" dataSource="jdbc/gav">
    SELECT ParishName, OwnerOccupierHousehold, OwnerOccupierPercOfOverall, OwnerOccupierCo2Emissions,
    SocialRentedHousehold, SocialRentedPercOfOverall, SocialRentedCo2Emissions, PrivateRentedHousehold,
    PrivateRentedPercOfOverall, PrivateRentedCo2Emission, TotalHouseholds, TotalPerc, Average,
    Total2001, TotalEstimatedTotal2006, EmissionsPerPerson, EmissionPerHousehold, EmissionsPerParish,
    EnergyChampionsNeeded, NumberOfPeopleAtWork, NumberOfSchoolAgeChildren
    FROM base_data as b
    WHERE b.id = ? <sql:param value="${param.id}"/>
    <sql:param value="${param.id}"/>
    </sql:query>
    <c:set var="parish" scope="request" value="${parish.rows[0]}"/>
    here is the error i get:
    java.sql.SQLException: Parameter index out of range (2 > number of parameters, which is 1).
    please any help would be appreciated!!! Thanks in advance guys .

    here is my code for the form on the index page:
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%>
    <sql:query var="parish" dataSource="jdbc/gav">
    SELECT id, ParishName FROM base_data
    </sql:query>
    <form action="response.jsp">
    Select a Parish: <select name="id">
    <c:forEach var="parish" items="${parish.rows}">
    <option value="${parish.id}">${parish.ParishName}</option>
    </c:forEach>
    </select><br><input type="submit" value="submit" name="submit" /></form>
    here is the code for the response page:
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%>
    <sql:query var="parish" maxRows="1" dataSource="jdbc/gav">
    SELECT b.id, b.ParishName, b.OwnerOccupierHousehold, b.OwnerOccupierPercOfOverall, b.OwnerOccupierCo2Emissions,
    b.SocialRentedHousehold, b.SocialRentedPercOfOverall, b.SocialRentedCo2Emissions, b.PrivateRentedHousehold,
    b.PrivateRentedPercOfOverall, b.PrivateRentedCo2Emission, b.TotalHouseholds, b.TotalPerc, b.Average,
    b.Total2001, b.TotalEstimatedTotal2006, b.EmissionsPerPerson, b.EmissionPerHousehold, b.EmissionsPerParish,
    b.EnergyChampionsNeeded, b.NumberOfPeopleAtWork, b.NumberOfSchoolAgeChildren
    FROM base_data as b
    WHERE b.id = ? <sql:param value="${param.id}"/>
    </sql:query>
    <c:set var="parish" scope="request" value="${parish.rows[0]}"/>
    i display the results like this : ${parish.EmissionsPerParish}
    the user should be able to select a parish from a form and then sql query created and then i want to show the row results on the response page.
    could you tell me where so should be a simple process although not simple enough as it may seem.
    thanks for the advice keith

  • MYSQL Query

    I have a question to a MYSQL query (using PHP) in a site I
    created for a
    client.
    I need to output the sum of one particular column in a table.
    I created
    an "exercise counter" for subscribers to this particular
    page, which is
    supposed to help them keeping track of how much exercise they
    get. So
    each day they add an amount, and it gets added up per week.
    What i need to output is the total amount of exercise of all
    users combined.
    So I just made a query, and go through however many rows
    there are in
    the result and add those up.
    But then I was thinking what if that table grows enourmously
    in size.
    (lets say there will be 100.000 subscribers and they each
    count each week).
    The calculating amount would be quite enormous.
    So then I thought, hey the heck with it, i throw in another
    table which
    just contains the total amount and each time a user adds on
    his count, i
    just do that too...
    Am I walking the long way or is my reasoning somewhat sound?
    Anurag

    Anuragbabaji wrote:
    > Steve wrote:
    >> On Thu, 07 Dec 2006 18:38:20 -0500, Anuragbabaji
    >> <[email protected]> wrote:
    >>
    >>> Am I walking the long way or is my reasoning
    somewhat sound?
    >>
    >> All you need is the SUM function:
    >>
    >>
    http://www.tizag.com/mysqlTutorial/mysqlsum.php
    >
    > looks great... BUT do you think that if the table has a
    zillion rows...
    > do you think the two table solution would be faster...
    >
    > I don't want to have to go back in five years ;)
    would it be sufficient and/or adviseable to simply "index"
    the column?
    anurag

  • Mysql Query VS Vector Object

    I run mysql query using Java, and the results of it are put in a vector object. Due to the vector object is made by 1 element (it's sure because I wrote the database) I'd like to take it and put it in a string variable, but Java returns me a lot of exceptions; here is the code:
    public Vector eseguiQuery(String query) {
         Vector v = null;
         String [] record;
         int colonne = 0;
         try {
            Statement stmt = db.createStatement();     // Creo lo Statement per l'esecuzione della query
            ResultSet rs = stmt.executeQuery(query);   // Ottengo il ResultSet dell'esecuzione della query
            v = new Vector();
            ResultSetMetaData rsmd = rs.getMetaData();
            colonne = rsmd.getColumnCount();
            while(rs.next()) {   // Creo il vettore risultato scorrendo tutto il ResultSet
               record = new String[colonne];
               for (int i=0; i<colonne; i++) record[i] = rs.getString(i+1);
               v.add( (String[]) record.clone() );
            rs.close();     // Chiudo il ResultSet
            stmt.close();   // Chiudo lo Statement
         } catch (Exception e) { e.printStackTrace(); errore = e.getMessage(); }
         return v;
    public String autentica(String query){
              String s = (String) db.eseguiQuery(query).get(0);
              System.out.println(s);
              return s;
         }...Please help me!

    1. You're not calling ResultSet.next() to move the result set onto the first row of results.
    2. (Edit) Deleted because you were in fact closing your objects, though you should still use a finally block to make absolutely certain.
    3. The exceptions tell you what the problem is - when you post a question please include these.
    Edited by: dcminter on 06-Aug-2008 17:04

  • How to export result set from mysql query browser to .sql in oracle

    Hi folks:
    I was trying to export result set from MySql query browser to Oracle. I could able to do
    File->Export Result Set-> Excel format...
    What I am trying to get is .sql file so that I can run it as a script in my oracle db. Is there any way we can get .sql file with inserts and delimeters ....?
    Did you guys get my question.?
    Please throw some light on this....
    Could be very appreciable ....
    Thanks
    Sudhir Naidu

    Hi
    Create a sql statement which generates the insert statements.
    Something like this:
    select 'insert into table1 (column1, column2, column3) values (' ||
    column1 || ', ' || column2 || ', ' || column3 || ');' from table 1;
    The || sign is the string concatenation sign in Oracle, replace it the appropriate sign in MySql. Export the result set of this query into a file, and you can run it in a SqlPlus.
    Ott Karesz
    http://www.trendo-kft.hu

  • Generate XML based on MySQL Query

    Hello guys,
    I need to create a XML file like this one(same structure) but based on MySQL query:
    <chart>
       <chart_type>pie</chart_type>
       <chart_data>
          <row>
             <null/>
             <string>2007</string>
             <string>2008</string>
             <string>2009</string>
          </row>
          <row>
             <string>Region A</string>
             <number>10</number>
             <number>30</number>
             <number>63</number>
          </row>
       </chart_data>
    </chart>
    I found a couple of good articles but I do not know how to get the same structure, I tried this:
    <?php
    header("Content-type: text/xml");
    $host = "localhost";
    $user = "test";
    $pass = "test";
    $database = "test";
    $enlace = mysql_connect($host, $user, $pass) or die("Error MySQL.");
    mysql_select_db($database, $enlace) or die("Error base de datos.");
    $query = "SELECT AGENTE, count(*) FROM clientes group by agente";
    $resultado = mysql_query($query, $enlace) or die("Sin resultados.");
    $salida_xml = "<?xml version=\"1.0\"?>\n";
    $salida_xml .= "<chart>\n";
    $salida_xml .= "<chart_type>" . 'pie' . "</chart_type>\n";
        $salida_xml .= "<chart_data>\n";
        for($x = 0 ; $x < mysql_num_rows($resultado) ; $x++){
            $fila = mysql_fetch_assoc($resultado);
            $salida_xml .= "\t<row>\n";
            $salida_xml .= "\t\t<agente>" . $fila['AGENTE'] . "</agente>\n";
            $salida_xml .= "\t\t<cantidad>" . $fila['count(*)'] . "</cantidad>\n";
                // Corregiendo caracteres incorrectos
                $fila['texto'] = str_replace("&", "&amp;", $fila['texto']);
                $fila['texto'] = str_replace("<", "&lt;", $fila['texto']);
                $fila['texto'] = str_replace(">", "&gt;", $fila['texto']);
               // $salida_xml .= "\t\t<texto>" . $fila['texto'] . "</texto>\n";
            $salida_xml .= "\t</row>\n";
        }//segundo for
        $salida_xml .= "</chart_data>\n";
    $salida_xml .= "</chart>";
    echo $salida_xml;
    but I'm not getting the same structure, I am getting this:
    <chart>
    <chart_type>pie</chart_type>

    <chart_data>
    <row>
        </row>

    <row>
    <agente>Danilo</agente>
    <cantidad>8</cantidad>
    </row>
    <row>
        </row>

    <row>
    <agente>Evelyn</agente>
    <cantidad>5</cantidad>
    </row>
    <row>
        </row>

    <row>
    <agente>Maribel</agente>
    <cantidad>2</cantidad>
    </row>
    <row>
        </row>

    <row>
    <agente>Nestor</agente>
    <cantidad>11</cantidad>
    </row>
    <row>
        </row>

    <row>
    <agente>Noemy</agente>
    <cantidad>2</cantidad>
    </row>
    </chart_data>
    </chart>
    Can someone give me a hand plase?
    Thanks in advance

    Doing some extra research I almost get to the result that I need, I guess I am jus
    t having an small problem.
    Basically I need this
    [PHP]
    <chart>
       <chart_type>pie</chart_type>
       <chart_data>
          <row>
             <null/>
             <string>2007</string>
             <string>2008</string>
             <string>2009</string>
          </row>
          <row>
             <string>Region A</string>
             <number>10</number>
             <number>30</number>
             <number>63</number>
          </row>
       </chart_data>
    </chart>
    [/PHP]
    Currently I have this:
    [PHP]
    <chart>
        <chart_type>pie</chart_type>
        <chart_data>
            <row>
                <null></null>
                <agente>Danilo</agente>
                <agente>Evelyn</agente>
                <agente>Maribel</agente>
                <agente>Nestor</agente>
                <agente>Noemy</agente>
            </row>
            <row>
                <rutas>rutas</rutas>
                <cantidad></cantidad>
                <cantidad></cantidad>
                <cantidad></cantidad>
                <cantidad></cantidad>
                <cantidad></cantidad>
            </row>
        </chart_data>
    </chart>
    [/PHP]
    And I am using this code
    [PHP]<?php
    header("Content-type: text/xml");
    $host = "xxx";
    $user = "xxxx";
    $pass = "xxxx";
    $database = "xxxx";
    $enlace = mysql_connect($host, $user, $pass) or die("Error MySQL.");
    mysql_select_db($database, $enlace) or die("Error base de datos.");
    $query = "SELECT AGENTE, count(*) FROM clientes WHERE PREVENTA LIKE 'Viernes' group by agente";
    $resultado = mysql_query($query, $enlace) or die("Sin resultados.");
    $salida_xml = "<?xml version=\"1.0\"?>\n";
    $salida_xml .= "<chart>\n";
    $salida_xml .= "\t<chart_type>" . 'pie' . "</chart_type>\n\n";
    $salida_xml .= "\t<chart_data>\n";
                $salida_xml .= "\t\t<row>\n";
                $salida_xml .= "\t\t\t<null>" . $fila5['NULL']. "</null>\n";
                for($y = 0 ; $y < mysql_num_rows($resultado) ; $y++){
                    $fila2 = mysql_fetch_assoc($resultado); 
                    $salida_xml .= "\t\t\t<agente>" . $fila2['AGENTE'] . "</agente>\n";
                    }//cierro for Y
                $salida_xml .= "\t\t</row>\n";
                $salida_xml .= "\t\t<row>\n";    
                $salida_xml .= "\t\t\t<rutas>" . 'rutas'. "</rutas>\n";
                for($z = 0 ; $z < mysql_num_rows($resultado) ; $z++){
                    $valor = mysql_fetch_assoc($resultado);
                    $salida_xml .= "\t\t\t<cantidad>" . $valor['count(*)'] . "</cantidad>\n";
                }//cierro for z
                $salida_xml .= "\t\t</row>\n";
        $salida_xml .= "\t</chart_data>\n";
    $salida_xml .= "</chart>";
    echo $salida_xml;
    ?>[/PHP]
    The issue I am having is that it is not showing the quantity, in this case "cantidad", does someone know why?

  • Some diffrence in oracle query and mysql query

    sir i see both query in SessionBean1
    mysql query
    SELECT ALL usert.username,
    usert.userid,
    usert.camid FROM usert
    this not use user name
    oracle query
    SELECT ALL MFA.LUSER.USERID,
    MFA.LUSER.TITLE,
    MFA.LUSER.CAMPID,
    MFA.LUSER.PWD,
    MFA.LUSER.USERNAME
    FROM MFA.LUSER
    the user name mfa is use in this query you can see
    this is main diffrence
    but i yse both in code but not get result
    try {
    RowKey userRowKey = luserDataProvider.findFirst
    (new String[] { "MFA.LUSER.USERNAME" },
    new Object[] { textField4.getText()});
    if (userRowKey == null) {
    textField3.setText("11111");
    return null;
    } else {
    textField3.setText("22222");
    return null;
    catch (Exception e) {
    log("Cannot perform login for userid " + textField3.getText(), e);
    error("Cannot perform login for userid " + textField3.getText() + ": " + e);
    textField3.setText("77777");
    return null;
    problem in only oracle not in mysql
    please give me idea how i get result
    thank you

    can you post your query with explain plan for both 9i version and 10g version.
    Thanks,
    karthick.

  • Need help writing a MySQL query that will return only records with matching counter-parts

    Since I don't know how to explain this easily, I'm using the
    table below as an example.
    I want to create a MySQL query that will return only records
    that have matching counter-parts where 'col1' = 'ABC'.
    Notice the 'ABC / GHI' record does not have a
    counter-matching 'GHI / ABC' record. This record should not be
    returned because there is no matching counter-part. With this
    table, the 'ABC / GHI' record should be the only one returned in
    the query.
    How can I create a query that will do this?
    id | col1 | col2
    1 | ABC | DEF
    2 | DEF | ABC
    3 | ABC | GHI
    4 | DEF | GHI
    5 | GHI | DEF
    *Please let me know if you have no idea what I'm trying to
    explain.

    AngryCloud wrote:
    > Since I don't know how to explain this easily, I'm using
    the table below as an
    > example.
    >
    > I want to create a MySQL query that will return only
    records that have
    > matching counter-parts where 'col1' = 'ABC'.
    >
    > Notice the 'ABC / GHI' record does not have a
    counter-matching 'GHI / ABC'
    > record. This record should not be returned because there
    is no matching
    > counter-part. With this table, the 'ABC / GHI' record
    should be the only one
    > returned in the query.
    >
    > How can I create a query that will do this?
    >
    >
    > id | col1 | col2
    > --------------------
    > 1 | ABC | DEF
    > 2 | DEF | ABC
    > 3 | ABC | GHI
    > 4 | DEF | GHI
    > 5 | GHI | DEF
    >
    >
    > *Please let me know if you have no idea what I'm trying
    to explain.
    >
    Please be more clear. You say that 'ABC / GHI' should not be
    returned,
    and then you say that 'ABC / GHI' should be the only one
    returned. Can't
    have both...

  • Getting number of results from mysql query.

    Hi,
    Is there an easy way to get the number of rows (results) returned by a mysql query without looping through each result and incrementing using the rs.next()?
    Statement statement = connection.createStatement();
                   ResultSet rs = statement.executeQuery("SELECT * FROM sometable WHERE name=\"John\"");
                   

    Have you looked at the mysql documentation at all ?
    What about "SELECT count(*) FROM sometable WHERE name=\"John\"");
    And if this value is going to be dynamic at all consider using a preparedStatement.
    Note Haven't worked with MySql so this isn't guarenteed to work, but you get the idea. This is more of a sql question than a java question

Maybe you are looking for

  • I purchased a movie on iTunes, and it is not playing

    I recently purchased the 2009 Star Trek movie on my iTunes account in SD. After the download of the movie was completed, I tried to play the movie. When I hit play on the movie, a window popped up saying that I had to sign into my account to authoriz

  • 2004s BI & SEM-BCS 6.0 in one System?

    Hi, Rumors say you should keep SEM out of your central BI and give it its own BI, to avoid painful patch/release dependencies. Should the SEM-BCS be installed on a separate system, because of patch interdependencies with the central BI? If yes, does

  • Web.xml question -- ejb-ref

    Can anyone explain the reasons for using the <ejb-ref> tag in the web.xml file? Currently, I have a context-param that matches a param-name to a param-value. My code looks up the param-value and, via JNDI, gets the EJB referenced. Does the <ejb-ref>

  • Issue with notes being deleted

    My notes keep disappearing from the built in notes application. I click done and the notes show up in my list, but then they disappear later. Does anyone else have this problem?

  • Edge Animate will not launch

    I've download Adobe Edge Animate through the CC and after installation it won't launch, it just freezes and I get the spinning beach ball of woe and have to force quit. I'm running the programme on OS X 10.8.4.