dbi accessor for mysql_insertid

2001-12-14 Thread Rich Duzenbury
Statement handles appear to have an accessor method to return the last insert id: $new_id = $sth-insertid; But I cannot seem to locate one for the database handle. The closest I have found is the $new_id = $dbh-{'mysql_insertid'}; In the case of a $dbh-do(...) where there is no statement

Re: dbi accessor for mysql_insertid

2001-12-14 Thread Rich Duzenbury
/01, sherzodR wrote: $dbh-mysql_insertid() Rich Duzenbury wrote: RD: Date: Fri, 14 Dec 2001 14:15:36 -0600 RD: From: Rich Duzenbury [EMAIL PROTECTED] RD: To: [EMAIL PROTECTED] RD: Subject: dbi accessor for mysql_insertid RD: RD: Statement handles appear to have

Can a function be called as a default?

2001-12-04 Thread Rich Duzenbury
3.23.43 It would be handy to be able to call a mysql built-in as a column default. The reason this would be handy is that I could then go to my umpteen tables and just add one column and suddenly I could know who is changing each record. Otherwise, I have to go to my umpteen x umpteen

Re: Can I use the concept of Effective Date with MySQL?

2001-11-02 Thread Rich Duzenbury
I've got the same issue that you do. Here is my thinking thus far: Say I have a transaction table: Record_Key Service_Date Item_Code Item_Quantity I'm considering this structure for the rate table: Item_Code Effective_Date Rate It's practical from a data entry perspective, but I can't seem to

Re: Upgrading to MyISAM table type

2001-10-30 Thread Rich Duzenbury
I don't believe that the table is corrupt, I'm more inclined to believe your zero theory. create table crashme (a int(10) not null auto_increment primary key) type=isam; insert into crashme set a=0; # actually inserts a = 1; update crashme set a=0 where a = 1; insert into crashme set a=0; #

Re: Mysql as backend for email ?!?

2001-09-21 Thread Rich Duzenbury
I'm a little fuzzy on this, but I seem to recall that a .forward file can call a program (perl script?) of your choosing for each mail message. Or, perhaps procmail can do this task? Regards, Rich At 01:05 PM 9/21/01, Christopher Bergeron wrote: Does anyone know of any applications that

Re: MySQL and Perl

2001-09-11 Thread Rich Duzenbury
PHP has built in functions that will dump an entire row into an array (this works with CSV and SQL databases).well there is my 2 cents worth on PHP+MySQL Um, not to start a language war, perl also can dump a row into an array, as well as into a hash so that one can refer to fields by name,

Re: MySQL vs. AS/400

2001-09-11 Thread Rich Duzenbury
I realize my opinion may be unpopular in this forum, however, I have to say that if it's mission critical, I would want an IBM AS/400. As a consultant, I work with numerous hospital and health care companies that each manage tens of gigs of data on their machines. There is very little

Re: MySQL vs. AS/400

2001-09-11 Thread Rich Duzenbury
At 10:30 PM 9/11/01, you wrote: OK mine are more respected :) j/k another point of view. Sorry, I didn't understand your comment. 1st You are assuming this only runs on Intel machines. I have MySQL running on a Sun E-4500 (8 x400mhz procs / 8GB RAM) running Solaris 8 on a financial

Re: MySQL vs. AS/400

2001-09-11 Thread Rich Duzenbury
At 12:33 AM 9/12/01, Eric Frazier wrote: You forgot to metion the great new feature becoming available. Secure telnet, it never existed before very recently for AS/400. Secure huh? Yeah. There are companies making web apps for the AS/400 that are advertising that you can use the web and it is

Re: Minimal Mysql

2001-09-07 Thread Rich Duzenbury
I don't know how small the mysql distro can be made but I'm guessing pretty small. I see that the mysqld on my box runs about 1.4mb. I have seen linux setups that can boot entirely from a floppy (so less than 1.44MB) at http://www2.linuxrouter.org:81/ , perhaps you may also be interested in

MySQL client for AS/400

2001-08-25 Thread Rich Duzenbury
Has anyone ported a MySQL client to IBM AS/400? I have a customer (on AS/400) that would like to mirror some data to a MySQL server. Thank you for any help you can offer. Regards, Rich - Before posting, please check:

Re: dbi-connect

2001-08-18 Thread Rich Duzenbury
Umm, you didn't specify a username or password...you instead passed 'undef'. This is the connect string I use: $dbh = DBI-connect( DBI:mysql:database=$pb_db; host=$pb_server; port=$pb_port, $pb_user, $pb_password,

Re: MySQL or MS SQL?

2001-07-18 Thread Rich Duzenbury
I like MySQL, and I'm fairly new at it, but if I were to need to store and retrieve tens of Gb's, I would want an IBM AS/400. Base configurations are quite reliable, and you can easily add RAID and other types of redundant support, up to and including redundant machines. I work with numerous

Re: Creating Table with a Default Datetime field

2001-06-27 Thread Rich Duzenbury
Only the first timestamp is updated by MYSQL. Create two timestamp fields. MySQL will maintain the first one. Set timestamp2 to null when the record is created. Regards, Rich At 10:54 AM 6/27/01 -0500, Pete Harlan wrote: TIMESTAMP is not the solution to his problem; he wants the date to

GUI - again

2001-06-21 Thread Rich Duzenbury
Someone was asking about GUI's for mysql and I saw a number of responses. Unfortunately, in my case, mysql (on *nix) is limited to listening to requests only on localhost (security), so I can't use any of the windows clients. Are there any gnome front ends to mysql? I'm looking for something

Re: GUI - again

2001-06-21 Thread Rich Duzenbury
/01 -0500, Rich Duzenbury wrote: Someone was asking about GUI's for mysql and I saw a number of responses. Unfortunately, in my case, mysql (on *nix) is limited to listening to requests only on localhost (security), so I can't use any of the windows clients. Are there any gnome front ends

RE: concated comparisons stopped working properly

2001-06-14 Thread Rich Duzenbury
Mysql version 8.0, distrib 3.22.32 select (1 5 3) = 1 select ((15) 3) = 1 select (1 (5 3)) = 0 In this version, apparently left to right. Regards, Rich At 05:16 PM 6/14/01 +0100, Jon Haworth wrote: And why do you think it should return 0 ? ( 1 5 ) returns 1. ( 1 3 ) returns 1.

Elapsed time

2001-06-11 Thread Rich Duzenbury
Ver 8.0, Distrib 3.22.32. I have two fields in a table that are TIMESTAMP fields. I'd like to show the amount of elapsed time between the two timestamps in a human readable format. For example, I'd like to print 'Elapsed time: 1 year 4 months 27 days 9 hours 13 minutes 42 seconds. ' Or

Auto Increment

2001-06-11 Thread Rich Duzenbury
Ver 8.0, Distrib 3.22.32 I have a customer file, keyed by an auto-increment customer number. Customers can have orders. The order file is keyed by an auto-increment order sequence number, which works fine, but is not convenient. Rather, I would like the order sequence number to start at 1