MySql equivalent of ORacle Connect by Prior clause ?
Hi, Any one knows if MySQL implemented the feature which is equivalent to Oracle's Connect by Prior clause. This is needed for retrieving 'Tree' result set from a table like : thanks BG - Original Message - From: Juan Carlos Escobar Gzz [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 06, 2003 9:00 AM Subject: error message Hi! I have executed this instruction: $sess = mysql_db_query($db,select * from session where ID = '$session'); $brow = mysql_result($sess,0,browser); Why display this message:? Warning: Unable to jump to row 0 on MySQL result index 4 in What is my error? Thanks, *** Ing. Juan Carlos Escobar González Jefe de la Unidad de Informática Secretaría de Desarrollo Económico Gobierno del Estado de Chiapas Tel. 01 962 6 28 94 50 ext. 3300 *** -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Trapping error thru eval is not working?
Anyone has any experience of trapping error using DBI-mySQL. The following code is not trapping the error. it is producing system generated error. $memberId='2a'; my($memberId)=@_; my($sql)= select member_id from members where member_id != . $memberId; my $sth = $dbh-prepare($sql) || die Error . $DBI::errstr; eval { $sth-execute() } ; print Error while calculating : $@) if $@; while (my $ref = $sth-fetchrow_hashref()) { ... it gives the output which does not have my message Error while cqalculating .. [Tue Oct 1 05:53:27 2002] C:\Inetpub\intranet\dev\cgi-bin\Score.pl: DBD::mysql: :st execute failed: Unknown column '2a' in 'where clause' at C:\Inetpub\intranet \dev\cgi-bin\Score.pl line 25. Content-type: text/html H1Software error:/H1 PRE Error Unknown column '2a' in 'where clause' at C:\Inetpub\intranet\dev\cgi -bin\Score.pl line 25. /PRE P For help, please send mail to this site's webmaster, giving this error message and the time and date of the error. [Tue Oct 1 05:53:27 2002] C:\Inetpub\intranet\dev\cgi-bin\Score.pl: Error Unkn own column '2a' in 'where clause' at C:\Inetpub\intranet\dev\cgi-bin\Score.pl li ne 25. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Basic RPM installation?
Since mySQL at this time does not support sub query, Do I've to break this into 2 SQLs and process: select question_id from questions where abs_sort_order in (select min(a.abs_sort_order) from questions a where a.abs_sort_order 1) Ben - Original Message - From: DeNewbie [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, September 28, 2002 8:03 AM Subject: Basic RPM installation? In my first posting I had the following problem; mike@cords-orj86jfje:/usr/bin safe_mysqld [1] 1759 mike@cords-orj86jfje:/usr/bin cat: /var/lib/mysql/cords-orj86jfje.pid: Permission denied rm: cannot unlink `/var/lib/mysql/cords-orj86jfje.pid': Permission denied Fatal error: Can't remove the pid file: /var/lib/mysql/cords-orj86jfje.pid /usr/bin/safe_mysqld: /var/lib/mysql/cords-orj86jfje.err: Permission denied Please remove it manually and start /usr/bin/safe_mysqld again mysqld daemon not started I removed the cords-orj86jfje.err file from /var/lib/mysql/cords-orj86jfje.err and I performed the mysql_install_db script all over again, now I have this problem in that I get the same response even after removing the cords-orj86jfje.err file. mike@cords-orj86jfje:/usr/bin safe_mysqld [1] 1059 mike@cords-orj86jfje:/usr/bin Starting mysqld daemon with databases from /var/lib/mysql /usr/bin/safe_mysqld: /var/lib/mysql/cords-orj86jfje.err: Permission denied /usr/bin/safe_mysqld: /var/lib/mysql/cords-orj86jfje.err: Permission denied tee: /var/lib/mysql/cords-orj86jfje.err: Permission denied 020928 10:47:57 mysqld ended tee: /var/lib/mysql/cords-orj86jfje.err: Permission denied [1]+ Exit 1 safe_mysqld mike@cords-orj86jfje:/usr/bin cd /var/lib/mysql mike@cords-orj86jfje:/var/lib/mysql ls mysql test mike@cords-orj86jfje:/var/lib/mysql ls -l total 1 drwx--x--x2 mysqlroot 506 Sep 2 14:20 mysql drwxr-xr-x2 mysqlroot 35 Sep 2 14:20 test I have the safe_mysql in my /usr/bin but I get this; mike@cords-orj86jfje:~ cd /usr/bin mike@cords-orj86jfje:/usr/bin safe_mysql [1] 1118 bash: safe_mysql: command not found [1]+ Exit 127safe_mysql mike@cords-orj86jfje:/usr/bin ls safe* safe-rm safe_mysqld mike@cords-orj86jfje:/usr/bin su Password: cords-orj86jfje:/usr/bin # safe_mysql [1] 1126 bash: safe_mysql: command not found [1]+ Exit 127safe_mysql cords-orj86jfje:/usr/bin # What do I do from here ??? Thanks, DeNewbie - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: how to set autocommit
Heikki , Thanks for your reply. So what should I do in the mean time. Is there a work around. 1. Can I put in the connect string? like DBI-connect(DBI:mysql:database=devdb;host=localhost, {'RaiseError' = 1, 'AutoCommit = 0}); This does not work. 2. Should I use begin like ($sth is the the DB handle) $sth-do(begin) $sth-do(insert into...) $sth-rollback() or anything else. I tried from setting up a mysql prompt, and still does not take it like mysqlset autocommit=0 mysqlinsert into... mysqlrollback when I do that it says Error 1196 Warning: Some non-transactional changed tables couldn't be rolled back Thanks Ben - Original Message - From: Heikki Tuuri [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, July 28, 2002 11:37 PM Subject: Re: how to set autocommit Ben, I have added the following item to the TODO list of September 2002. I guess it will appear only in the MySQL-4.0 branch, as 4.0 will be the new stable branch within a few months. ... September, 2002: Add a global MySQL my.cnf option autocommit_default=0. ... Best regards, Heikki Tuuri Innobase Oy --- InnoDB - transactions, hot backup, and foreign key support for MySQL See http://www.innodb.com, download MySQL-Max from http://www.mysql.com - Original Message - From: Ben Goswami [EMAIL PROTECTED] Newsgroups: mailing.database.mysql Sent: Monday, July 29, 2002 7:52 AM Subject: how to set autocommit Hi, Where should I change the autocommit setting to 0 (i.e no Autocommit). I'm inserting row from perl script using DBI. I would like to bring up mySQL server with autocommit false, so that I can explicitly commit from the front end. But with lot of research in various docs I could not find where to changer the settings. If I supply it in the connect string, it does not take it. Any help is appreciated - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
how to set autocommit
Hi, Where should I change the autocommit setting to 0 (i.e no Autocommit). I'm inserting row from perl script using DBI. I would like to bring up mySQL server with autocommit false, so that I can explicitly commit from the front end. But with lot of research in various docs I could not find where to changer the settings. If I supply it in the connect string, it does not take it. Any help is appreciated - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php