Re: Site Attack/Failure Recovery

2008-05-14 Thread John Comerford
Quickly scanning this page, it doesn't seem to give syntax for an incremental backup. I am hoping to be able to run something that dumps only data changed since the last backup. Rob Wultsch wrote: On Wed, May 14, 2008 at 10:25 PM, John Comerford <[EMAIL PROTECTED]> wrote: 2) Incremental

Re: Site Attack/Failure Recovery

2008-05-14 Thread Rob Wultsch
On Wed, May 14, 2008 at 10:25 PM, John Comerford <[EMAIL PROTECTED]> wrote: > 2) Incremental Backups - say one every half hour, then a script to transfer > that to an off site machine that way I can get the DB back to within the > last good half hour... http://dev.mysql.com/doc/refman/5.0/en/mysql

Re: CONCAT doesn't work with NULL?

2008-05-14 Thread 王旭
i execute follow sql. select concat_ws('','d','\n','c'); the result is : ++ | concat_ws('','d','\n','c') | ++ | d c| ++ There are no result as you said. - Original Message - F

Re: ????: RE: comparison operations in IN subquery

2008-05-14 Thread Dan Nelson
In the last episode (May 15), raid fifa said: > Jerry Schwartz <[EMAIL PROTECTED]> : > > look at the following test case: > > > > mysql> create table temp1( id int)ENGINE=innodb; > >Query OK, 0 rows affected (0.18 sec) > > > >mysql> create table temp2( tid varchar(10))ENGINE=innodb; > >Query OK

Site Attack/Failure Recovery

2008-05-14 Thread John Comerford
Hi Folks, I am fairly new to MySQL and I am going to be setting up a web site on a third party hosting machine. I continuously hear horror stories about machines/sites being hacked and databases being destroyed. Despite my best efforts I am sure I have some security flaws in my site. What I

Re: Table Structure

2008-05-14 Thread Krishna Chandra Prajapati
Hi, Since user_id is a primary key. It should work either with any of the column and with both the column. Any suggestion. Thanks On Thu, May 15, 2008 at 1:22 AM, Rob Wultsch <[EMAIL PROTECTED]> wrote: > On Tue, May 13, 2008 at 1:30 AM, Krishna Chandra Prajapati > <[EMAIL PROTECTED]> wrote: >

Re: CONCAT doesn't work with NULL?

2008-05-14 Thread Paul DuBois
On May 14, 2008, at 10:53 AM, Afan Pasalic wrote: hi, I have query SELECT CONCAT(r.first_name, ' ', r.last_name, '\n', r.organization, '\n', r.title, '\n', a.address1, '\n', a.city, ', ', a.state, ' ', a.zip, '\n', r.email) FROM registrants r, addresses a WHERE r.reg_id=121 if any of col

Re: inserting client time instead of server time

2008-05-14 Thread Rob Wultsch
On Mon, May 12, 2008 at 11:25 PM, Sebastian Mendel <[EMAIL PROTECTED]> wrote: > Hi, > > is there a way or a function like NOW() except it returns the client time > and not the server time? > > -- > Sebastian Mendel Timezone for the client is used for NOW(), but the client timezone default to that

Re: Timestamps replicating inconsistently depending on local timezone of server?

2008-05-14 Thread Rob Wultsch
On Wed, May 14, 2008 at 12:55 PM, Ed W <[EMAIL PROTECTED]> wrote: > Rob Wultsch wrote: >> >> This sounds like expected behavior to me. If you set the timezone one >> hour forward a timestamp will be one hour forward. The data stored on >> the server is the same, and will display the same if you cha

Re: Timestamps replicating inconsistently depending on local timezone of server?

2008-05-14 Thread Ed W
Rob Wultsch wrote: This sounds like expected behavior to me. If you set the timezone one hour forward a timestamp will be one hour forward. The data stored on the server is the same, and will display the same if you change the timezone. The timezone setting when the insert occurred should have no

Re: Table Structure

2008-05-14 Thread Rob Wultsch
On Tue, May 13, 2008 at 1:30 AM, Krishna Chandra Prajapati <[EMAIL PROTECTED]> wrote: > Hi all, > > Below is the user_delivery table structure. > > CREATE TABLE `user_delivery` ( > `user_id` decimal(22,0) NOT NULL default '0', > `delivery_id` decimal(22,0) NOT NULL default '0', > `send_to_regula

Re: Timestamps replicating inconsistently depending on local timezone of server?

2008-05-14 Thread Rob Wultsch
On Tue, May 13, 2008 at 11:56 PM, Ed W <[EMAIL PROTECTED]> wrote: > Rob Wultsch wrote: >> >> On Tue, May 13, 2008 at 2:07 PM, Ed W <[EMAIL PROTECTED]> wrote: >> >>> >>> I had naively assumed that dates would always be stored in UTC in the >>> database and the only effect of localtime would be for

RE: replace chr(10) in field

2008-05-14 Thread Neil Tompkins
I thought this, but when I display the information in a Memo box in my C++ builder application I get little square boxes (binary type chars). And all the information is displayed on the same line. Any ideas why ? > Date: Wed, 14 May 2008 13:08:04 -0500> From: [EMAIL PROTECTED]> To: [EMAIL

Re: CONCAT doesn't work with NULL?

2008-05-14 Thread wim . delvaux
On Wednesday 14 May 2008 18:52:20 Afan Pasalic wrote: > actually, this will not work for me (or I got it wrong :D) because I > need to have street, state and zip in one line and with separator > defined on the beginning it will put everything in separate lines. Use a 'space' as sparator instead of

replace chr(10) in field

2008-05-14 Thread Neil Tompkins
Hi, I've got some data in our fields which contain a carriage return 'chr(10)', as saved using a ASP page. I'm now trying to extract the information from a different system, however the saved chr(10) are showing as binary values. What would be the best way for my to replace chr(10) to a \n ?

Re: CONCAT doesn't work with NULL?

2008-05-14 Thread Afan Pasalic
actually, this will not work for me (or I got it wrong :D) because I need to have street, state and zip in one line and with separator defined on the beginning it will put everything in separate lines. :D ewen fortune wrote: Hi Afan, You can use concat_ws http://dev.mysql.com/doc/refman/5.

Re: CONCAT doesn't work with NULL?

2008-05-14 Thread Afan Pasalic
First, I want to thank to everybody on such afast respond. Thank you. Second, what would be difference between concat_ws and the Randalll's solution (bellow)? -afan Price, Randall wrote: Could you use something like this (untried): SELECT CONCAT(COALESCE(r.first_name, ''), ' ',

Re: CONCAT doesn't work with NULL?

2008-05-14 Thread Afan Pasalic
Thanks Ewen, that's what I was looking for! :D -afan ewen fortune wrote: Hi Afan, You can use concat_ws http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_concat-ws --- CONCAT() returns NULL if any argument is NULL. CONCAT_WS() does not skip empty strings. However, it does

RE: CONCAT doesn't work with NULL?

2008-05-14 Thread Price, Randall
Could you use something like this (untried): SELECT CONCAT(COALESCE(r.first_name, ''), ' ', COALESCE(r.last_name,''), '\n', COALESCE(r.organization, ''), '\n', COALESCE(r.title,''), '\n', COALESCE(a.address1, ''), '\n',

Re: CONCAT doesn't work with NULL?

2008-05-14 Thread wim . delvaux
On Wednesday 14 May 2008 18:02:42 Olexandr Melnyk wrote: > It doesn't return no rows, it returns row(s) with a single column set to a > NULL value. In case one of the arguments is NULL, CONCAT() will return > NULL. > > To replace the value of one of the fields with an empty string when it's > NULL,

Re: CONCAT doesn't work with NULL?

2008-05-14 Thread ewen fortune
Hi Afan, You can use concat_ws http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_concat-ws --- CONCAT() returns NULL if any argument is NULL. CONCAT_WS() does not skip empty strings. However, it does skip any NULL values after the separator argument --- Ewen On Wed, May 14, 2

Re: CONCAT doesn't work with NULL?

2008-05-14 Thread Olexandr Melnyk
It doesn't return no rows, it returns row(s) with a single column set to a NULL value. In case one of the arguments is NULL, CONCAT() will return NULL. To replace the value of one of the fields with an empty string when it's NULL, you can use something like: CONCAT(COAESCE(a, ''), ' ', COAESCE(b,

CONCAT doesn't work with NULL?

2008-05-14 Thread Afan Pasalic
hi, I have query SELECT CONCAT(r.first_name, ' ', r.last_name, '\n', r.organization, '\n', r.title, '\n', a.address1, '\n', a.city, ', ', a.state, ' ', a.zip, '\n', r.email) FROM registrants r, addresses a WHERE r.reg_id=121 if any of columns has value (e.g. title) NULL, I'll get as result 0

RE: comparison operations in IN subquery

2008-05-14 Thread Jerry Schwartz
>Hi guys, > > look at the following test case: > > mysql> create table temp1( id int)ENGINE=innodb; >Query OK, 0 rows affected (0.18 sec) > >mysql> create table temp2( tid varchar(10))ENGINE=innodb; >Query OK, 0 rows affected (0.07 sec) > >mysql> insert into temp1 values(1); >Query OK, 1 row affe

Re: Query execution time - MySQL

2008-05-14 Thread Eric Frazier
Neil Tompkins wrote: Thanks for your help. In the end I've decided to use GetTickCount() Neil Date: Wed, 14 May 2008 13:44:22 +0100> From: [EMAIL PROTECTED]> To: [EMAIL PROTECTED]> CC: mysql@lists.mysql.com> Subject: Re: Query execution time - MySQL> > Hi Neil,> > If your using Linux then

Re: comparison operations in IN subquery

2008-05-14 Thread Dan Nelson
In the last episode (May 14), xian liu said: > mysql> select * from temp1; > +--+ > | id | > +--+ > |1 | > |2 | > |3 | > |4 | > +--+ > 4 rows in set (0.01 sec) > > mysql> select * from temp2; > +---+ > | tid | > +---+ > | 2,3,4 | > +---+ > 1 row in

RE: Query execution time - MySQL

2008-05-14 Thread Neil Tompkins
Thanks for your help. In the end I've decided to use GetTickCount() Neil > Date: Wed, 14 May 2008 13:44:22 +0100> From: [EMAIL PROTECTED]> To: [EMAIL > PROTECTED]> CC: mysql@lists.mysql.com> Subject: Re: Query execution time - > MySQL> > Hi Neil,> > If your using Linux then you have to inst

RE: Query execution time - MySQL

2008-05-14 Thread Neil Tompkins
Hi Ben I running on Windows. I think I need a solution where i can get the search time within my sql query. Is this possible. At the moment I;m running mysql server version 3.28 Neil > Date: Wed, 14 May 2008 13:44:22 +0100> From: [EMAIL PROTECTED]> To: [EMAIL > PROTECTED]> CC: mysql@li

Re: Query execution time - MySQL

2008-05-14 Thread Ben Clewett
Hi Neil, If your using Linux then you have to install the glib RPM's in the usual way. I don't know about other platforms, but I am sure there will be a version of glib out there... Also ensure the correct include and link directives are in your Makefile, which you can get (on Linux) using

Re: Query execution time - MySQL

2008-05-14 Thread Ben Clewett
If you using C++ then you can use this: http://developer.gimp.org/api/2.0/glib/glib-Timers.html I use this in my code, does an excelent job. Also you may want to look at the 'slow log' in mysql which will show, to the nearest second, the length of queries Ben Neil Tompkins wrote: Hi Cr

RE: Query execution time - MySQL

2008-05-14 Thread Neil Tompkins
Hi Craig, Thanks for your detailed reply. Basically what I'm trying to extract is the time taken from when I execute the mysql query in my C++ Builder program until the time the query has finished. So my question is can I build in to my SQL query SELECT Name FROM Customers the time the quer

Re: Query execution time - MySQL

2008-05-14 Thread Craig Huffstetler
Greetings Niel, Not much detail there (but I'll go off what you provided...). Some people limit the actual MySQL system for times it TAKES MySQL to execute queries. For THIS to be accomplished, MySQL has built-in functionality to measure the time is takes queries to take place so it can ... limit

Query execution time - MySQL

2008-05-14 Thread Neil Tompkins
Hi, When performing a SQL query like SELECT Name FROM Customers. How do I obtain the time in which the query took to execute like 1.5 seconds etc Thanks, Neil _ All new Live Search at Live.com http://clk.atdmt.com/UKM/go/msnnkm

comparison operations in IN subquery

2008-05-14 Thread xian liu
Hi guys, look at the following test case: mysql> create table temp1( id int)ENGINE=innodb; Query OK, 0 rows affected (0.18 sec) mysql> create table temp2( tid varchar(10))ENGINE=innodb; Query OK, 0 rows affected (0.07 sec) mysql> insert into temp1 values(1); Query OK, 1 row affected (