Re: [MYSQL] need simple help

2011-05-12 Thread Peter Brawley
On 5/12/2011 2:30 PM, Grega Leskovšek wrote: CREATE TABLE log ( idlog int auto_increment not null, imepriimek varchar(50), clock timestamp, action varchar(30), onfile varchar(100), filesize float(6,2), uniqueid(idlog) ); CREATE TABLE log ( idlog int auto_increment primary key, imepriimek va

[MYSQL] need simple help

2011-05-12 Thread Grega Leskovšek
Can smbd please look at this sentence - I got an error and do not know how to fix it - I am still very unfamiliar with MYSQL: CREATE TABLE log ( idlog int auto_increment not null, imepriimek varchar(50), clock timestamp, action varchar(30), onfile varchar(100), filesize float(6,2), uniqueid(

RE: problem

2011-05-12 Thread Gavin Towey
The server will disconnect idle connections after a while. The wait_timeout variable controls how many seconds it will wait. You can set it for your connection when you connect by issuing a query like: SET SESSION wait_timeout=NNN; Just give it a large enough value. But also, since your prog

Re: operation with dates

2011-05-12 Thread Dan Nelson
In the last episode (May 12), Rocio Gomez Escribano said: > I found it, > > mysql> select userID from user where datediff(now(), userPaymentDate)< 365; This can be made more readable by using mysql's INTERVAL syntax. It can also be made more efficient by moving userPaymentDate out of the functi

RE: operation with dates

2011-05-12 Thread Rocio Gomez Escribano
I found it, mysql> select userID from user where datediff(now(), userPaymentDate)< 365; Thanks Rocío Gómez Escribano r.go...@ingenia-soluciones.com Polígono Campollano C/F, nº21T 02007 Albacete (España) Tlf:967-504-513  Fax: 967-504-513 www.ingenia-soluciones.com -Mensaje origin

Re: operation with dates

2011-05-12 Thread Andrew Moore
Rocio, there are specific date functions that you need to learn to allow you to complete this kind of query. Please check out the MySQL documentation for this. HTH Andy On Thu, May 12, 2011 at 4:05 PM, Rocio Gomez Escribano < r.go...@ingenia-soluciones.com> wrote: > Hello! I’m trying to subt

operation with dates

2011-05-12 Thread Rocio Gomez Escribano
Hello! I’m trying to subtract two dates in my consult, but I don’t get it, I did: mysql> select userID from user where (userPaymentDate - now()) < 365 ; It didn’t work. Do you know how to do it? Thank you so much! Regards Rocío Gómez Escribano

Re: MySQL Backup solution for non-technical user

2011-05-12 Thread Dotan Cohen
On Tue, May 10, 2011 at 22:58, Michael Heaney wrote: > Check out Zmanda: http://zmanda.com/zrm-mysql-enterprise.html > > Michael Heaney > JCVI > On Wed, May 11, 2011 at 10:00, Johan De Meersman wrote: > Zmanda ZRM backup, although the fancy webinterface is only available in the > commercial

Re: Efficiency of NULLIFie expression

2011-05-12 Thread misiaq
h...@tbbs.net wrote: (...) > > Is the optimizer so clever as to set that test outside the expression, and > only then evaluate it when "houmuch" and "SharePrice" are not equal? > > Try it yourself: mysql > explain extended select * from table1; and then mysql > show warnings; You will see

Efficiency of NULLIFie expression

2011-05-12 Thread Hal�sz S�ndor
ADDDATE(ereStart, (SELECT hwyl FROM Stock) * NULLIF(Houmuch, (SELECT SharePrice FROM Stock)) / (SELECT regularPayment FROM Stock)) AS goodThrough Buried in the middle of the foregoing expression is a NULLIF, because of which the whole thing is NULL if "houmuch" and "SharePrice" are equal. Thus t

DBCP error

2011-05-12 Thread Dhaval Jaiswal
I have seen the best practices for the connection pooling as below. Connection conn = null; Statement stmt = null; // Or PreparedStatement if needed ResultSet rs = null; try { conn = ... get connection from connection pool ... stmt = conn.createStatement("select ..."); rs = stmt