[GENERAL] simple query question to use with DBI selectall_hashref

2007-07-05 Thread Kenji Morishige
I would like to create a query that returns a column with an integer 1 through (row_count) to use as the index while used in conjunction with DBI's selectall_hashref($sql,$key) function. In the past I'd usually just write a wrapper around selectrow_hashref and put all those results in an array. I

[GENERAL] finding reusable ids

2007-08-06 Thread Kenji Morishige
I have a table that creates "check-out" records that stores information when a particular resource is being utilized. I want to maintain a friendly shortened ID so people can reference these check outs. At any given time, there should not be more than 99 or so check-outs, so as the check-outs

Re: [GENERAL] finding reusable ids

2007-08-07 Thread Kenji Morishige
is a bit more complicated as we actually don't have a a checked-in flag, but a start and finish time where users can actually store multiple overlapping records. Kenji On Tue, Aug 07, 2007 at 12:23:00PM +0200, Nis Jørgensen wrote: > Kenji Morishige skrev: > > I have a table that

[GENERAL] best way to calculate accumulating intervals timestamps

2007-04-02 Thread Kenji Morishige
I'm hoping there is some way to do this without writing a function, but there may be no way around it. I have a table that contains two epoch based time stamps, 'start' and 'finish'. They are both timestamp values that are data wherehoused for resource utilization monitoring. Management wants t

[GENERAL] Newbie Question, how to grant permissions on all tables in schema/db

2004-11-08 Thread Kenji Morishige
Hi guys, I'm wondering what the easy way to grant user/group access on all tables in a db. I just migrated about 200 tables from my MySQL database using a cool migration script, but now all the tables are owned by me in the schema public. That is all fine and all, but I wish I could run a comman