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.

Similar Messages

  • [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!

  • 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

  • MySql Query Browser Problems !

    Hi every body,
    i downloaded MySql (Mac OsX Version) and also the nice program MySql Query Browser, i can connect to the Database "test" (already coming with MySql), but i face many problems :
    1) when i right-click on the object browser and make "New Schema", write a name for this new shema, and click OK .... NOTHING happens and i can NOT see the New shema in the list in the object Browser! ... i right click again and choose Refresh many times ... Nothing appears !
    2) after i try 2 or 3 times doing that, the software Quit unexp....
    3) Is MySql Query Browser able to make a new Database and Design the relation ship between its tables also ??? i read ALL its Manual Guide, i found Nothing !
    4) Finally, the mac version does Not contain all what the windows version does!
    Many thanks...

    Fortunately there's a MySql forum,too:
    http://forums.mysql.com/
    Werner

  • MySQL Query Browser Broke?

    Ever since I upgraded to the latest gnome, et. al., the GUI tool "MySQL Query Browser" is broken.  I can connect to my local mysql installation and run queries, but I cannot choose a scheme without the processor pegging 100% and hanging.  I've ran "mysql-query-browser" from a command prompt and it doesn't spit out any errors or anything.
    I keep my machine pretty up to date with the core, current and extra packages.  I just updated Friday evening, then this morning and now it's broke.  I'm thinking something is related to the recent gnome upgrade?  Can anyone give this a try and see if they have the same issue?

    Does it have somethign to do with:
    MGConnectDialog.cc:718: error: 'input_handler' was not declared in this scope
    MGConnectDialog.cc:753: error: 'input_handler' was not declared in this scope
    make[3]: *** [MGConnectDialog.o] Error 1
    make[3]: *** Waiting for unfinished jobs....
    make[3]: Leaving directory `/home/blum/cvs/mysqlguitools/src/mysql-gui-tools-5.0r12/mysql-gui-common/source/linux'
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/home/blum/cvs/mysqlguitools/src/mysql-gui-tools-5.0r12/mysql-gui-common/source'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/blum/cvs/mysqlguitools/src/mysql-gui-tools-5.0r12/mysql-gui-common'
    make: *** [all] Error 2
    ==> ERROR: Build Failed. Aborting...

  • 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 ?

  • Trouble with city, state in Mysql Query

    Hello,
    I am having trouble with a query I am trying to setup.  Basically, I want the user to type in their city.  Then I want the system to ask them which city,state combo is theirs.  So if they enter "Washington" the system will return:
    Select your city/state:
    Washington, NJ
    Washington, PA
    Washington, DE
    City and state are stored as two fields in my mysql DB.  I was considering using 'select distinct' but I wasnt sure how it would work in relation to two fields.  So how would I go about making sure washington, nj only appears once (its in a database where there will be multiple washington, NJ listed).
    So anyone have any ideas or code samples they have used to do something like this?
    Thanks in advance,
    Mark

    davella wrote:
    City and state are stored as two fields in my mysql DB.  I was considering using 'select distinct' but I wasnt sure how it would work in relation to two fields.  So how would I go about making sure washington, nj only appears once (its in a database where there will be multiple washington, NJ listed).
    DISTINCT works the same way for single field or multiple fields.  It returns all distinct combinations of the values in the columns you have listed.
    SELECT  DISTINCT City, State
    FROM     Table
    WHERE  City = 'Washington'
    (Data) City, State
    Washington, NJ
    Washington, PA
    Washington, NJ
    Washington, DE
    Washington, NJ
    Washington, PA
    So for your two columns it would distinct combinations of the "City" and "State" values.  But why are there multiple "Washington, NJ" records? Are they actually different cities or duplicate records?
    (Results)
    Washington, NJ
    Washington, PA
    Washington, DE

  • MySQL query not outputting results

    Hi Guys,
    I want to retrieve a record from my database which has the latest date and output its contents onto the webpage. This is what I have done so far:
    ResultSet rs = DB.exQuery("SELECT max(transaction_date) as 'lastest_date',transaction_value,transaction_type"
                                  + "FROM transaction_log WHERE user_id =" + user.getId() + " AND is_credit = '1'");
    try {
         trans_date = rs.getString("lastest_date");
         credit = rs.getString("transaction_value");
         trans_method = rs.getString("transaction_type");
    } catch(SQLException ex) {}It compiles fine but when I run the servlet I get "java.lang.NullPointerException" on line 92 (+trans_date = rs.getString("lastest_date");+). I get the same error even if I add the rs.next() method. Note that the database will always only output ONE record. I checked the MySQL query (ran it on the server directly) and it worked fine.

    try {
    ResultSet rs = DB.exQuery("SELECT max(transaction_date) as lastest_date, transaction_value,transaction_type"
                                  + "FROM transaction_log WHERE user_id =" + user.getId() + " AND is_credit = '1'");
    if ( rs.next () ) {can you explain
    *     trans_date = rs.getString("lastest_date");* // trans_date is a string type or date type... and max(transaction_date) as lastest_date returns which type...
         credit = rs.getString("transaction_value");
         trans_method = rs.getString("transaction_type");
    } catch(SQLException ex) {}

  • Correct syntax to write this mysql query?

    Hello,
       Need some help writing a mysql query that I lack the knowledge to do.
    I have 2 tables, say table1 and table2.  I want to take data from column (state) in table 1 and replace what is in column (state_id) in  table 2.
    notes:
         The column names dont match.
         I can match up the unique user ids from table1 to table2, they are the same.
         I only want to replace data in a few columns, not the entire table, the other data must remain unchanged.
         I want to tfer the data in the tables themselves from one to the other, not just compiled as a mysql query result.
    Wasnt sure if i should use a merge?  tried a few ways but with no luck.
    anyone care to write something up i can use?  im sure its easy to write, i just cant write advanced queries off the top of my head like that :-)

    quote:bregent: "Or did you edit the error message?"  well i tried both with the table1 and without, then copied over the wrong error msg, since phpmyadmin doesnt like control + C. haha, good eye!
    ok i used this query from the site:
    UPDATE mIntent_profile, bought_adult
    SET mIntent_profile.state_id = bought_adult.state,
    mIntent_profile.city_id = bought_adult.city
    WHERE mIntent_profile.profile_id = bought_adult.id
    and it updated the state_id but for some reason it put all 0's in the city_id.  COuldnt figure it out for a few minutes, then it dawned on me to check the type of data that could be entered into the city_id column... it was INT.  changed it to VARCHAR and then it works.
    thanks a lot for the push in the right direction, now the search on my clients site works much better.

  • Taking Servlet's Parameter into Mysql query

    Hello Friends;
    Sorry about simplicity of the questions. I'm really a newbie.
    The parameter selectedcriteria[1] is a user input. How can we take that into mysql query. Because mysql doesn't know what is selectedcriteria[1] thus it doesn't provide the result.
    try{
                                   Class.forName("org.gjt.mm.mysql.Driver");
                                   con = DriverManager.getConnection("jdbc:mysql://localhost/fuzzs", "mycon","***");
                                   Statement theStatement=con.createStatement();
                                   ResultSet theResult=theStatement.executeQuery("select Avg(Score) from scores where Criterion=selectedcriteria[1]");

    Thanks all, but I used the first idea. Now the code works, but I'm having trouble with Truncate() function. When I make a statement "Select Truncate(Avg(Score),2)" it gives me a syntax error and tells me that It also can't find Avg(Score) field !!.
    String _suppliers = selectedsuppliers;
    String _criteria = selectedcriteria[j];
    String sql = "SELECT Avg(Score) from scores,suppliers,criteria ";
    sql += "WHERE scores.CriterionID = criteria.CriterionID ";
    sql += "and scores.SupplierID = suppliers.SupplierID ";
    sql += "and Criterion = '" + _criteria + "' ";
    sql += "and CompanyName = '" + _suppliers + "'";
    ResultSet theResult=theStatement.executeQuery(sql);
    while(theResult.next())

  • 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.

  • Available OLAP connection list not showing in Query browser

    Hi all,
    Hope everyone is doing great. I tried using query browser to consume BEx queries in dashboard. But I am not able to see the available connection list after choosing BEx query as my source in query browser. Attaching a screenshot of the same.
    Request your assistance in solving the issue. Am i missing any settings ? Please help
    Many thanks in advane,
    Nikhil Joy

    Hi Nikhil,
    Are you able to see the list of universes (Unx)?
    Also you could check the following
    1. Logon to Central Management Console (CMC).
    2. Go to Applications.
    3. Now double click on Web Service and go to Properties.
    4. Update the Access URL as mentioned below and click on Save & Close:
    http://<WebServer>:8080/dswsbobje
    Confirm if this URL is accessible in the browser.
    5. Launch Dashboard Design, open Query Browser, click on Add Query and enter BusinessObjects Enterprise logon credentials.
    Regards,
    Noopur

  • Query Browser not available in Dashboards appl !?

    Hello,
    We installed SAP BO Dashboards 4.1 SP2 (14.1.2.1121) and want to use universe queries in the dashboard.
    The workspace feature "Query Browser" is empty.
    We don't get the icons to logon to BOXI (to universe).
    Is this an installation issue? What do we need to check?
    Thanks,
    Bernd

    Hi Bernd,
    Happy to hear that, but please be aware using excel 2013 with dashboard designer. Most of the time it make issue in integrating with the data. Lot of discussions are happened regarding this. Few are listed below.
    Excel 2013 and SAP BusinessObjects Dashboards 4.1 Support Pack1 version 14.1.1.1036
    SAP BO Dashboard 4.1 Support pack 1, exported swf file URL component problem - Office 2013
    Better to go with the Excel 2010. Just felt to highlight the issues before going deep into the design.
    --SumanT

  • 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.

Maybe you are looking for