Re: Multiple revision of a record

2008-03-04 Thread Laurent Cerveau
Thanks to all for the answers. I have now some tries to do! Laurent Sent from my iPhone On Mar 4, 2008, at 5:58 PM, Jerry Schwartz <[EMAIL PROTECTED] infoshop.com> wrote: The tack we take is to have a separate table that tracks changes. It does, of necessity, contain the same fields as the

Only 3 weeks left for PostgreSQL conference

2008-03-04 Thread Joshua D. Drake
Hello, I know this is a *little* off topic but it is about Open Source databases :) There are only three weeks left to register for the PostgreSQL Community Conference: East! The conference is scheduled on March 29th and 30th (a Saturday and Sunday) at the University of Maryland. Come join us a

Using MySQL with its data files on a CD-R (recordable CD)

2008-03-04 Thread Michael Hemer
Hi, I have been researching to see if it's possible to have a MySQL database with it's data files on a cd-rom, but could use some help to determine if I have found out the full truth of what's possible. I would appreciate any additional info people have to offer. The situation I've been think

how to select total votes for each comment?

2008-03-04 Thread Patrick Aljord
Hey all, I have comments(id,content) and votes(comment_id,vote). vote is a tinyint. I would like to select total votes for each comment, I tried: "select content, sum(v.votes) from comments c left join votes v on c.id=v.comment_id" but it only returns first result obviously, any idea how I coul

Re: [PHP] Importing and exporting from MySQL, escape slash problem

2008-03-04 Thread Dave M G
Richard, Jed, Thank you for replying. Richard said: It's possible that there is an .htaccess file in phpMyAdmin that has Magic Quotes on that is messing you up... The .htaccess file for phpMyAdmin says "php_flag magic_quotes_gpc Off", so I guess that means I'm okay there. Other than that,

RE: Problems with timestamp and leap seconds?

2008-03-04 Thread Tim McDaniel
On Tue, 4 Mar 2008, Jay Blanchard <[EMAIL PROTECTED]> wrote: It was much too quick a reply on my part but it is my understanding that a TIMESTAMP field is updated according to server time and you cannot actually insert a value. I may be wrong as I have never tested this. Even in pre-4.1 version

RE: Problems with timestamp and leap seconds?

2008-03-04 Thread Jay Blanchard
[snip] > The column type needs to be DATETIME. Thank you for pointing me at TIMESTAMP versus DATETIME. I'll read thoroughly when I can. Can you give a little more detail as to why DATETIME is necessary? [/snip] It was much too qu

RE: Problems with timestamp and leap seconds?

2008-03-04 Thread Tim McDaniel
On Tue, 4 Mar 2008, Jay Blanchard <[EMAIL PROTECTED]> wrote: [snip] I had a bit of BFOTO and tried simple inserts. mysql> create table t (f timestamp); Query OK, 0 rows affected (0.00 sec) mysql> insert into t values ('2008-03-04 16:17:00'); Query OK, 1 row affected (0.00 sec)

RE: Problems with timestamp and leap seconds?

2008-03-04 Thread Jay Blanchard
[snip] I had a bit of BFOTO and tried simple inserts. mysql> create table t (f timestamp); Query OK, 0 rows affected (0.00 sec) mysql> insert into t values ('2008-03-04 16:17:00'); Query OK, 1 row affected (0.00 sec) mysql> select * from t; +-+

Re: Problems with timestamp and leap seconds?

2008-03-04 Thread Tim McDaniel
I had a bit of BFOTO and tried simple inserts. mysql> create table t (f timestamp); Query OK, 0 rows affected (0.00 sec) mysql> insert into t values ('2008-03-04 16:17:00'); Query OK, 1 row affected (0.00 sec) mysql> select * from t; +-+ | f

Problems with timestamp and leap seconds?

2008-03-04 Thread Tim McDaniel
Howdy -- new to the list. BigCorp has a Bugzilla database that uses version 4.1.7-standard. We've been taking backups using mysqldump. I thought to verify a backup, in essence by mysqldump bugzilla > B mysql test < B mysqldump test > T diff B T Everything is the same, except tha

MySQL University session on March 6

2008-03-04 Thread Stefan Hinz
Hi, sorry for a second mail on the same subject, but I forgot to mention that Alexander Barkov's MySQL University session http://forge.mysql.com/wiki/How_to_Add_a_Collation will be an IRC-only question-and-answer session. So please visit the session page, look at the presentation uploaded there

Re: Getting the last item in a "group by" query?

2008-03-04 Thread Baron Schwartz
Hi, On Tue, Mar 4, 2008 at 10:57 AM, Esbach, Brandon <[EMAIL PROTECTED]> wrote: > > There is likely a blindingly obvious solution to this, I need to do a > group by expression in my query and get the latest row based on a date > field in the same table. > Is this even possible, and any tips on

Re: Getting the last item in a "group by" query?

2008-03-04 Thread Daniel Brown
On Tue, Mar 4, 2008 at 12:02 PM, Esbach, Brandon <[EMAIL PROTECTED]> wrote: > Hmm didn't notice that replies are sent to personal emails :o! > I'll look down that avenue once I've completed the mysql version upgrade > (mysql 4 on my test bench, mysql5 upgrade in progress on the production > serv

RE: Getting the last item in a "group by" query?

2008-03-04 Thread Esbach, Brandon
Hmm didn't notice that replies are sent to personal emails :o! I'll look down that avenue once I've completed the mysql version upgrade (mysql 4 on my test bench, mysql5 upgrade in progress on the production server) Thanks again! -Original Message- From: Daniel Brown [mailto:[EMAIL PROTEC

Re: Multiple revision of a record

2008-03-04 Thread Jerry Schwartz
The tack we take is to have a separate table that tracks changes. It does, of necessity, contain the same fields as the original record (including the ID of the records being modified). It also contains fields that specify whether the record was deleted or updated, when, and by whom. There is also

Re: Getting the last item in a "group by" query?

2008-03-04 Thread Daniel Brown
On Tue, Mar 4, 2008 at 11:24 AM, Esbach, Brandon <[EMAIL PROTECTED]> wrote: > Thanks for the reply, > > Sorry, should have been more specific on that :). > I need to access the last record by date for each serial_number in the > table (not just latest record) Okay, this is untested, so I do

Re: Multiple revision of a record

2008-03-04 Thread Peter Brawley
Laurent, >I'd like to be able to track changes made to the attribute of one record, >without wanting to duplicate the complete record each time . How an I achieve this? It often turns out that trying to make a SQL-level audit trail of such changes is more expensive in time and code than a sim

Re: Getting the last item in a "group by" query?

2008-03-04 Thread Daniel Brown
On Tue, Mar 4, 2008 at 10:57 AM, Esbach, Brandon <[EMAIL PROTECTED]> wrote: [snip!] > SELECT > t.pass, t.id > FROM > theTable t > GROUP BY > t.serial_number > ORDER BY > t.date desc Try adding the LIMIT keyword. SELECT t.pass, t.id FROM theTable t GROU

Getting the last item in a "group by" query?

2008-03-04 Thread Esbach, Brandon
There is likely a blindingly obvious solution to this, I need to do a group by expression in my query and get the latest row based on a date field in the same table. Is this even possible, and any tips on how to do that? Example of data and query: --- Table: =(pseudo table based on origio

Re: what is a schema? what is a database?

2008-03-04 Thread Paul DuBois
At 8:58 AM + 3/4/08, Thufir wrote: On Mon, 03 Mar 2008 14:20:58 -0500, Martin Gainty wrote: http://dev.mysql.com/doc/refman/5.0/en/schemata-table.html According to MYSQL doc: A schema is a database That contradicts the following claim (to my reading): "A true fully (database, schema

MySQL University session on March 6

2008-03-04 Thread Stefan Hinz
Hi, this Thursday, Alexander Barkov will give a MySQL University session: http://forge.mysql.com/wiki/How_to_Add_a_Collation Please register for this session by filling in your name on the session Wiki page. Registering is not required but appreciated. That Wiki page also contains a section to p

FW: Re: what is a schema? what is a database?

2008-03-04 Thread Garris, Nicole
My experience (Oracle, PostgreSQL, MySQL, SQL Server) is that every DBMS is different in this regard. Microsoft's SQL Server works like this: A SQL Server instance ("server") can have many databases. A database can have many schemas, schema simply being a grouping for objects in a database. In a

Re: change pw

2008-03-04 Thread Hiep Nguyen
got it. thanks. t. hiep On Tue, 4 Mar 2008, Dan Rogart wrote: That error occurs when the user has already been dropped - so it's good news :). You can check for users with blank user names and/or blank passwords by querying the mysql.user table: select user,host,password from mysql.user wher

Re: change pw

2008-03-04 Thread Dan Rogart
That error occurs when the user has already been dropped - so it's good news :). You can check for users with blank user names and/or blank passwords by querying the mysql.user table: select user,host,password from mysql.user where user = '' or password = ''; Those are the users you should consi

Re: change pw

2008-03-04 Thread Hiep Nguyen
On Tue, 4 Mar 2008, Dan Rogart wrote: You should definitely consider getting rid of them, otherwise people can log in to MySQL from any host with no credentials. They are created during installation by the mysql_install_db script. This tells you how to remove them: http://dev.mysql.com/doc/ref

unnormalize db here is more efficient?

2008-03-04 Thread Nacho Garcia
Hi, i hope this is the right place for this basic question. i have a table like this: TABLE elements `id_element` INT UNSIGNED NOT NULL , `name` VARCHAR(100), `date` DATE ... and other table with the comments of every element. TABLE elements_comments `id_element` INT UNSIGNED NOT NULL , `commen

Re: change pw

2008-03-04 Thread Dan Rogart
You should definitely consider getting rid of them, otherwise people can log in to MySQL from any host with no credentials. They are created during installation by the mysql_install_db script. This tells you how to remove them: http://dev.mysql.com/doc/refman/5.0/en/default-privileges.html -Dan

Re: password for system user

2008-03-04 Thread Dan Rogart
You can have a file called .my.cnf in your home directory that stores it. This page outlines it pretty well: http://www.modwest.com/help/kb6-242.html In your case, you would just want to use the password = 'foo' part of it. -Dan On 3/4/08 4:10 AM, "Thufir" <[EMAIL PROTECTED]> wrote: > I unde

Re: Debugging mysql limits

2008-03-04 Thread Phil
Just inheritance from an old design that has passed it's limits. I actually have a development version which does just that, but there is a lot of work to convert many php scripts and sql to include the new column. It's some way away from live though, so the problem I outlined still exists. Phil

Re: change pw

2008-03-04 Thread Hiep Nguyen
On Mon, 3 Mar 2008, Daniel Brown wrote: On Mon, Mar 3, 2008 at 2:46 PM, Hiep Nguyen <[EMAIL PROTECTED]> wrote: mysql> select user,host,password from mysql.user; +--+--+--+ | user | host | password | +--+---

Multiple revision of a record

2008-03-04 Thread Laurent Cerveau
Hi I am a beginner to mySQL so I hope this is not a too basic question I'd like to be able to track changes made to the attribute of one record, without wanting to duplicate the complete record each time . How an I achieve this? Thanks laurent -- MySQL General Mailing List For list archi

password for system user

2008-03-04 Thread Thufir
I understand that there's a configuration so that instead of typing: [EMAIL PROTECTED] ~ $ mysql -u root -ppassword that the password (of "password") is stored so that whenever this user connects as root the password is automatically passed. Is this possible? thanks, Thufir -- MySQL Ge

Re: Debugging mysql limits

2008-03-04 Thread Thufir
On Thu, 28 Feb 2008 11:19:40 -0500, Phil wrote: > I have 50 plus tables lets call them A_USER, B_USER, C_USER etc which I > daily refresh with updated (and sometimes new) data. > > I insert the data into a temporary table using LOAD DATA INFILE. This > works great and is very fast. May I ask wh

Re: what is a schema? what is a database?

2008-03-04 Thread Thufir
On Mon, 03 Mar 2008 14:20:58 -0500, Martin Gainty wrote: > http://dev.mysql.com/doc/refman/5.0/en/schemata-table.html According to > MYSQL doc: > A schema is a database That contradicts the following claim (to my reading): "A true fully (database, schema, and table) qualified query is exempli