Re: select between date

2006-08-03 Thread Penduga Arus
On 8/1/06, Chris <[EMAIL PROTECTED]> wrote: Did you look at the link David sent you? http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html thanks.. I manage to do that.. below is my solution. please advice if there is any better solution SELECT a017namaper, DATE_FORMAT(a017tkhla

Re: Fatal error

2006-08-03 Thread Kaushal Shriyan
On 8/3/06, Martin Jespersen <[EMAIL PROTECTED]> wrote: Looks like drupal had an error when doing the backup - mysql is complaining over the fact that your backup.sql file contains a html formated fatal error message. Kaushal Shriyan wrote: > Hi ALL > > I have taken backup of http://mydomain.com/

Re: Fatal error

2006-08-03 Thread Martin Jespersen
1) Throw away the backup.sql as it is useless 2) Talk to the guys who made drupal and make them aware of the flaw in their software 3) Change the php.ini settings for maximum execution time next time try to place non-mysql related questions elsewhere ;) Kaushal Shriyan wrote: On 8/3/06, Marti

How many columns??

2006-08-03 Thread Ratheesh K J
Hello all, Just wanted to know how many columns are preferable in table. At present we are having nearly 50 - 60 columns in some of the tables. Is this ok or should we be splitting the tables for normalization. If we really need to split then how better would it be in terms of performance.? 1

Questions on PRIMARY KEY

2006-08-03 Thread Ratheesh K J
Hello all, Need an explanation on this: SELECT col1, col2, ... FROM tbl1 JOIN tbl2 ON (some cond) JOIN tbl3 ON (some cond) . . . WHERE col1 > AND col2 > etc... Running an EXPLAIN o

Re: Questions on PRIMARY KEY

2006-08-03 Thread Aleksandar Bradaric
Hi, > WHERE > col1 > AND col2 > etc... > AND PRIMARYKEY > 0; [...skip...] > I need an explanation of whether what I did is an > optimization or not? Or should i be looking into something > else to actually optimize the query. The best way to optimize it is would be to a

version of mysql

2006-08-03 Thread Vittorio Zuccalà
Hello, i'm installing an open source program based on mysql because i want to try it. It controls mysql's version and it wants 4.1.16 but i've 4.1.11... Is it possible telling to mysql server to give a different number of its version? In other words: is there some configuration that let me t

Re: How many columns??

2006-08-03 Thread Miles Thompson
At 06:32 AM 8/3/2006, Ratheesh K J wrote: Hello all, Just wanted to know how many columns are preferable in table. At present we are having nearly 50 - 60 columns in some of the tables. Is this ok or should we be splitting the tables for normalization. If we really need to split then how be

Re: Table analysis - Help required urgently

2006-08-03 Thread Brent Baisley
You should look at what MySQL is doing, start by looking at SHOW STATUS and SHOW VARIABLES. The SHOW STATUS will give you an idea how your indexes are performing, thread management, open file management, etc. You can file a lot of info in there and some variables you can adjust on the fly. There

Alter Problem

2006-08-03 Thread Nicholas Vettese
I am working on a script that looks at the MySQL Table, checks to see if there are any matches, and if there are, alter the table to add the requested information. Here is the code I am using: $query = "ALTER profile (acct_type, username, firstname, lastname, email, addr1, city, state, zip, n

RE: Alter Problem

2006-08-03 Thread Peter Lauri
Maybe: $query = "UPDATE profile SET acct_type='%at', ., genre='$g' WHERE id=$userid" /Peter -Original Message- From: Nicholas Vettese [mailto:[EMAIL PROTECTED] Sent: Thursday, August 03, 2006 9:12 PM To: mysql@lists.mysql.com Subject: Alter Problem I am working on a script that loo

RE: Alter Problem

2006-08-03 Thread Peter Lauri
Comment: ALTER is used to change the structure of an table, for example add an extra column or change the default values etc. Or to add an index or similar. -Original Message- From: Nicholas Vettese [mailto:[EMAIL PROTECTED] Sent: Thursday, August 03, 2006 9:12 PM To: mysql@lists.mysql.co

Re: Alter Problem

2006-08-03 Thread Miles Thompson
At 11:12 AM 8/3/2006, Nicholas Vettese wrote: I am working on a script that looks at the MySQL Table, checks to see if there are any matches, and if there are, alter the table to add the requested information. Here is the code I am using: $query = "ALTER profile (acct_type, userna

Re: Check out this Free software I found to document your IT infrastruct

Will L wrote: Rob Munsch, I am a member of the Nabble project. This is regarding a bad post by user "itguy321". Just want to explain a few things. Nabble is a free mailing list archive/gateway that works like Gmane. Users can browse, search, and post via Nabble's web interface and the post w

building mysql-5.0.22 from src

hi... i have FC3/4 systems. i'm going to need to have mysql-5.0.22, but there appears to be numerous dependencies that yum can't easily resolve from the RPM i've found. can i reasonably easily build mysql-5.0.22 from src for my FC3/4 systems... the systems are pretty much standard systems. thank

RE: Check out this Free software I found to document your IT infrastruct

Will L. wrote: > Nabble hates spam as much as you do. We are currently monitoring this > user and we will take necessary action just like a mailing list owner > will do. If you hated spam as much as I did, you would have terminated this user, based on the egregious and well-documented abuse of th

Re: Monitoring Slow Queries

Thanks, Philip. On 8/2/06, Philip Hallstrom <[EMAIL PROTECTED]> wrote: .. http://hackmysql.com/mysqlsla . That's definitely of immense help. -- Thanks a zillion, Asif -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscri

Re: Database Return Errors

Thanks for replying, John. On 8/2/06, John Meyer <[EMAIL PROTECTED]> wrote: Have you checked out MyConnector/NET and the MySqlException class? From: Asif Lodhi [mailto:[EMAIL PROTECTED] Subject: Database Return Errors The question is: Can I get the error-codes or error-names that MySQL returns

Re: Join with additional table, stumped

Scott, how about the use of a MERGE table? create a merge table 'orders' with 'orders_npfd' and 'orders_npfs' underneath it. http://dev.mysql.com/doc/refman/5.0/en/merge-storage-engine.html Dan On 8/2/06, Scott Haneda <[EMAIL PROTECTED]> wrote: Forgive the mess I present you, this is a strang

RE: Check out this Free software I found to document your IT infrastruct

On 3 Aug 2006 at 10:16, John Trammell wrote: > If you hated spam as much as I did, you would have terminated this user, > based on the egregious and well-documented abuse of this list. > This message has been scanned for viruses by McAfee's Groupshield. You say you hate spam then spam the li

Re: Check out this Free software I found to document your IT infrastruct

I think equating a tagline indicating something's been spam-checked with a full out message for a web product is a little absurd. On 8/3/06, Ian <[EMAIL PROTECTED]> wrote: You say you hate spam then spam the list with an advert for McAfee! Ian -- "I'm American, fatboy. What's your excuse?"

Re: upgrading mysql...

On 8/2/06, bruce <[EMAIL PROTECTED]> wrote: hi.. i have FC3, with 4.1.13, i also have FC4 with 4.1.20. however, i can't seem to find 5.0.x RPMs for FC3/4. do i have to go ahead and build this from source for the FC3/4 boxes that i have... Linux x86 generic RPM at: http://dev.mysql.com/downloa

Re: Is this query possible?

the query works, but i need to get the total number of songs on that CD, as well as the sum of the lengths of the songs on the CD... is that possible in 1 query? On 8/2/06, Tanner Postert <[EMAIL PROTECTED]> wrote: just to clarify to Brent, the songs lists the original artist and album. the CD

Query problem

Hi, I have a table logging downloads (time, username, download). Now I'd like to have the last 5 downloads per user. Can someone tell me a solution (or what to search for)? Regards, André -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://l

Re: Query problem

On 8/3/06, André Hänsel <[EMAIL PROTECTED]> wrote: Hi, I have a table logging downloads (time, username, download). Now I'd like to have the last 5 downloads per user. Can someone tell me a solution (or what to search for)? SELECT download FROM table WHERE username='user' ORDER BY time DES

Re: Query problem

For a specific username: SELECT username, time, download FROM table WHERE username = 'someusername' ORDER BY time DESC LIMIT 5 Dan On 8/3/06, André Hänsel <[EMAIL PROTECTED]> wrote: Hi, I have a table logging downloads (time, username, download). Now I'd like to have the last 5 downloads per

Re: Alter Problem

A quick question. I do not have `userid` setup in my script to update my table. Right now it is setup like this: $query = "SELECT userid FROM profile WHERE username = '$un'"; So when I go to change my usernamre, it creates a new row in the table with all the info. What would be the best way to

AW: Query problem

Hi Dan, hi Obed, of course I have no specific username, I want the last 5 downloads of each distinct username in the table. :) Regards, André > -Ursprüngliche Nachricht- > Von: Dan Buettner [mailto:[EMAIL PROTECTED] > Gesendet: Donnerstag, 3. August 2006 20:15 > An: André Hänsel > Cc: m

Re: AW: Query problem

SELECT DISTINCT username, time, download FROM table ORDER BY time DESC GROUP BY username André Hänsel wrote: > Hi Dan, hi Obed, > > of course I have no specific username, I want the last 5 downloads of each > distinct username in the table. :) > > Regards, > André > >> -Ursprüngliche Nachr

Re: Finding the closest value

Peter Brawley wrote: />Is there an efficient way to find the closest numerical value, across >three columns? I do not know if there is a way to find it across one. / Not sure about efficiency, but if the criterion number is @n, do you mean ... SELECT LEAST( ABS(MIN(@n-col1)), LE

Re: Query problem

At 03:08 PM 8/3/2006, André Hänsel wrote: Hi, I have a table logging downloads (time, username, download). Now I'd like to have the last 5 downloads per user. Can someone tell me a solution (or what to search for)? Regards, André -- MySQL General Mailing List For list archives: http://list

AW: Query problem

> -Ursprüngliche Nachricht- > Von: Miles Thompson [mailto:[EMAIL PROTECTED] > Gesendet: Donnerstag, 3. August 2006 21:56 > An: mysql@lists.mysql.com > Betreff: Re: Query problem > > At 03:08 PM 8/3/2006, André Hänsel wrote: > > >I have a table logging downloads (time, username, download)

Re: Running Totals?

You might look into WITH ROLLUP. That could easily give you cumulative totals for the year, but off the top of my head I can't think of a way to get it for the months. - Original Message - From: "Barry Newton" <[EMAIL PROTECTED]> To: Sent: Wednesday, August 02, 2006 10:29 PM Subject:

Re: AW: Query problem

André Hänsel wrote: >> -Ursprüngliche Nachricht- >> Von: Miles Thompson [mailto:[EMAIL PROTECTED] >> Gesendet: Donnerstag, 3. August 2006 21:56 >> An: mysql@lists.mysql.com >> Betreff: Re: Query problem >> >> At 03:08 PM 8/3/2006, André Hänsel wrote: >> >>> I have a table logging downloads

Re: Query problem

On 8/3/06, André Hänsel <[EMAIL PROTECTED]> wrote: Hi Dan, hi Obed, of course I have no specific username, I want the last 5 downloads of each distinct username in the table. :) i was thinking a lot... and i can't find the solution but maybe yo can do somthing like this select user,downl

Multiple-Column Indexes Question

Assuming we have the following table: CREATE TABLE test ( id INT NOT NULL, last_name CHAR(30) NOT NULL, first_name CHAR(30) NOT NULL, PRIMARY KEY (id), ); With last_name having 1,000 different values and first_name having 1000,000 different values... What is be

Re: Finding the closest value

Lee >I think the formula is just right - very clever. But is it possible to make >sure that col1, col2 and col3 are all from the same record? Different question, different answer I ween  :-) SET @n = ; SELECT   id,   MIN( LEAST( ABS(@n-col1), LEAST( ABS(@n-col2), ABS(@n-cl3) ))) AS min F

Re: Running Totals?

At 04:15 PM 8/3/2006, Brent Baisley wrote: You might look into WITH ROLLUP. That could easily give you cumulative totals for the year, but off the top of my head I can't think of a way to get it for the months. - Original Message - From: "Barry Newton" <[EMAIL PROTECTED]> To: Sent: We

Re: version of mysql

Vittorio Zuccalà wrote: Hello, i'm installing an open source program based on mysql because i want to try it. It controls mysql's version and it wants 4.1.16 but i've 4.1.11... Is it possible telling to mysql server to give a different number of its version? In other words: is there some co

Re: building mysql-5.0.22 from src

bruce wrote: hi... i have FC3/4 systems. i'm going to need to have mysql-5.0.22, but there appears to be numerous dependencies that yum can't easily resolve from the RPM i've found. can i reasonably easily build mysql-5.0.22 from src for my FC3/4 systems... the systems are pretty much standard

Re: Multiple-Column Indexes Question

Arias Gonzalez, Javier wrote: Assuming we have the following table: CREATE TABLE test ( id INT NOT NULL, last_name CHAR(30) NOT NULL, first_name CHAR(30) NOT NULL, PRIMARY KEY (id), ); With last_name having 1,000 different values and first_name having 1000,

RE: building mysql-5.0.22 from src

hi chris... i tried that approach with MySQL-5.0.22 i did the rpmbuild -- ... and got the rpms for mysql. when i tried to install the mysql server rpm, it kicked out the dependency error regading the libmysqlclient.so.14... other apps require this version apparently. i would have thought that

Re: building mysql-5.0.22 from src

bruce wrote: hi chris... i tried that approach with MySQL-5.0.22 i did the rpmbuild -- ... and got the rpms for mysql. when i tried to install the mysql server rpm, it kicked out the dependency error regading the libmysqlclient.so.14... other apps require this version apparently. i would hav

I have 972 vmware-bin.000XXX files!

I use a VMware for LAMP development work. I just looked in my /var/lib/mysql dir and there are 972 of these vmware-bin.01 ... vmware-bin.000972 files! Yipes! Do I need them? Can I delete them? How do I prevent them from being created all the time? Can't they all just go into one vmware-bin

RE: I have 972 vmware-bin.000XXX files!

Hi Daevid, There are the binary logs. Yes they are used for replication or you can use them much the same as a logical log exists in some other technologies. You can find a good description of them at the mysql manual website at : http://dev.mysql.com/doc/refman/5.0/en/binary-log.html Regard

Where may I find sqlplus.hh

Hello, I have downloaded a code on c++ to talk to MySQL database from net which included a file "sqlplus.hh" , where may I find the file?Please help me soon. With Regards. Ratnadeep Nayak.

How do I find all the users that are new since my last login

I have a SQL challenge I'm not sure how to solve. But it's so common, I feel kind of stupid asking this... I have a 'user' table with 'login_date' which is an auto updated DATETIME column and a 'created_on' which is a DATETIME (but not updated after the record is created the first time) I want to

Where may I find sqlplus.hh

Hello, I have downloaded a code on c++ to talk to MySQL database from net which included a file "sqlplus.hh" , where may I find the file?Please help me soon. With Regards. Ratnadeep Nayak.

where may I find sqlplus.hh??

Hello, I have downloaded a code on c++ to talk to MySQL database from net which included a file "sqlplus.hh" , where may I find the file?Please help me soon. With Regards. Ratnadeep Nayak.

Re: How do I find all the users that are new since my last login

Daevid Vincent wrote: I have a SQL challenge I'm not sure how to solve. But it's so common, I feel kind of stupid asking this... I have a 'user' table with 'login_date' which is an auto updated DATETIME column and a 'created_on' which is a DATETIME (but not updated after the record is created th

where may I find sqlplus.hh?

  Hello, I have downloaded a code on c++ to talk to MySQL database from net which included a file "sqlplus.hh" , where may I find the file?Please help me soon. With Regards. Ratnadeep Nayak.

Re: where may I find sqlplus.hh?

nayak_ratnadeep wrote: Hello, I have downloaded a code on c++ to talk to MySQL database from net which included a file "sqlplus.hh" , where may I find the file?Please help me soon. Why have you posted this 5 times? Did you look at the mysql website at ALL? It took me 30 seconds to find i

Re: where may I find sqlplus.hh?

nayak_ratnadeep wrote: I found in net but can't get the file. please help me.. Always reply to the list. Here's a hint: look for "C++ API" in the documentation. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROT