Date increment

2005-11-30 Thread Peter Lauri
Best group member, I have a field called expiredate of type date. I would like to add 17 days to the expiredate without doing any scripting, is that possible? Example: Expiredate is 2005-11-30 and I want to extend the expiredate with 17 days. Is there any function in MySQL that adds

Re: Date increment

2005-11-30 Thread Jyrki Laurila
Simply: http://dev.mysql.com/doc/refman/4.1/en/date-and-time-functions.html Just check the DATE_ADD part. On 11/30/05, Peter Lauri [EMAIL PROTECTED] wrote: Best group member, I have a field called expiredate of type 'date'. I would like to add 17 days to the expiredate without doing

problem with mysqld

2005-11-30 Thread Vemuramesh
DEar hai this vemu ramesh we r using the CRM application that is developed by LAMP when i install the that application it was install the Apache,php and mysql.so it was runing fine at that time but yesterday what happened is some my employee(administrator) was shutdown the system.after that

Re: problem with mysqld

2005-11-30 Thread anu bhaskar
Vemuramesh wrote: DEar hai this vemu ramesh we r using the CRM application that is developed by LAMP when i install the that application it was install the Apache,php and mysql.so it was runing fine at that time but yesterday what happened is some my employee(administrator) was shutdown the

Re: Date increment

2005-11-30 Thread Ciprian Constantinescu
SELECT DATE_ADD(expiredate, INTERVAL 17 DAYS) http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html Peter Lauri [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Best group member, I have a field called expiredate of type 'date'. I would like to add 17 days to the

Re: SHOW commands.

2005-11-30 Thread Michael Williams
Thanks for the responses everyone. Just a quick FYI, I am using Python as an intermediary to sync the DBs (I'm fine with using whatever as long as it's Debian compatible). I suppose I should have explained before, but I'm using the Python script to connect from a client machine to a

Re: Insert query problem

2005-11-30 Thread Brent Baisley
You can use the back quote(`) to escape the field name. It's the ~ key on the keyboard. tickets(`from`,`department`,... If you type SHOW CREATE TABLE tickets, you'll see mysql escapes all the field names to avoid reserve word conflicts. On Nov 29, 2005, at 2:14 PM, Rhino wrote: -

Rewriting subquery for old MySQL

2005-11-30 Thread Alex Gemmell
Hi, Unfortunately I need to use a query on an old MySQL (4.0.xx) and the one I currently have uses a subquery. So it works on my 4.1 but not with this 4.0. I have read in the MySQL manual that I can rewrite subqueries using joins but I don't see how with this query because I only have one

Re: Date increment

2005-11-30 Thread Cal Evans
You could use something like from_unixtime(to_unixtime(dateField)+(86400*17)) I store dates in unix timestamp format in bigints whenever possible for this very reason. =C= Peter Lauri wrote: Best group member, I have a field called expiredate of type ‘date’. I would like to add 17

Re: SHOW commands.

2005-11-30 Thread Kristen G. Thorson
Michael Williams wrote: Thanks for the responses everyone. Just a quick FYI, I am using Python as an intermediary to sync the DBs (I'm fine with using whatever as long as it's Debian compatible). I suppose I should have explained before, but I'm using the Python script to connect from a

RE: SHOW commands.

2005-11-30 Thread Mikhail Berman
Michael, You have three option with mysqldump command to do what you are looking for $mysqldump --add-drop-table db_name table_name - this one will dump data, create table info and add DROP TABLE IF EXIST on the top of the dump, so you would be able to re-create original table and its data to a

Login using certificate

2005-11-30 Thread Patrik Persson
Hi I have exhausted my resources in this matter and now need some guidance. I am trying to set up a MySQL 4.1.14 (Linux 2.6.9-22.0.1.EL #1 i686 athlon i386 GNU/Linux CentOS 4) server with certificate (x509) based login. Following the steps at the MySQL web page

Re: Rewriting subquery for old MySQL

2005-11-30 Thread SGreen
Alex Gemmell [EMAIL PROTECTED] wrote on 11/30/2005 10:06:09 AM: Hi, Unfortunately I need to use a query on an old MySQL (4.0.xx) and the one I currently have uses a subquery. So it works on my 4.1 but not with this 4.0. I have read in the MySQL manual that I can rewrite subqueries

Re: Rewriting subquery for old MySQL

2005-11-30 Thread Alex Gemmell
[EMAIL PROTECTED] wrote: Alex Gemmell [EMAIL PROTECTED] wrote on 11/30/2005 10:06:09 AM: Hi, Unfortunately I need to use a query on an old MySQL (4.0.xx) and the one I currently have uses a subquery. So it works on my 4.1 but not with this 4.0. I have read in the MySQL manual that I

Re: Rewriting subquery for old MySQL

2005-11-30 Thread rouvas
On Wednesday 30 November 2005 18:11, Alex Gemmell wrote: [EMAIL PROTECTED] wrote: Alex Gemmell [EMAIL PROTECTED] wrote on 11/30/2005 10:06:09 AM: Hi, Unfortunately I need to use a query on an old MySQL (4.0.xx) and the one I currently have uses a subquery. So it works on my 4.1 but

Re: Rewriting subquery for old MySQL

2005-11-30 Thread Dan Nelson
In the last episode (Nov 30), Alex Gemmell said: I tried splitting up the queries to see if it helped but it didn't work either: [PHP] $query1 = CREATE TEMPORARY TABLE tmpSubquery SELECT * FROM tblactivities WHERE Assignment_ID='.$row['Assignment_ID'].' ORDER BY Date

Re: Rewriting subquery for old MySQL

2005-11-30 Thread Alex Gemmell
Dan Nelson wrote: In the last episode (Nov 30), Alex Gemmell said: I tried splitting up the queries to see if it helped but it didn't work either: [PHP] $query1 = CREATE TEMPORARY TABLE tmpSubquery SELECT * FROM tblactivities WHERE Assignment_ID='.$row['Assignment_ID'].'

Re: Rewriting subquery for old MySQL

2005-11-30 Thread Alex Gemmell
rouvas wrote: On Wednesday 30 November 2005 18:11, Alex Gemmell wrote: [EMAIL PROTECTED] wrote: Alex Gemmell [EMAIL PROTECTED] wrote on 11/30/2005 10:06:09 AM: Hi, Unfortunately I need to use a query on an old MySQL (4.0.xx) and the one I currently have uses a subquery. So it works on

Re: Rewriting subquery for old MySQL

2005-11-30 Thread Michael Stassen
Alex Gemmell wrote: snip Thanks Shawn but I couldn't seem to get this to work. I made the point of checking the MySQL User that PHP connects with. I gave it CREATE and DROP privilages on the database schema in question. It previously only had SELECT privilages. From the manual

Newbie Question on Update

2005-11-30 Thread Kraer, Joseph
I am trying to update a couple of rows in a table by doing the following: update table set column5 = number1 where column 1 = number2 and column1 = number3 but it is not working. I tried listing the conditions separated by commas (where column 1 = number2, column1 = number3) and also didn't

Re: Rewriting subquery for old MySQL

2005-11-30 Thread SGreen
rouvas [EMAIL PROTECTED] wrote on 11/30/2005 10:18:33 AM: On Wednesday 30 November 2005 18:11, Alex Gemmell wrote: [EMAIL PROTECTED] wrote: Alex Gemmell [EMAIL PROTECTED] wrote on 11/30/2005 10:06:09 AM: Hi, Unfortunately I need to use a query on an old MySQL (4.0.xx) and the one

Re: Rewriting subquery for old MySQL

2005-11-30 Thread Michael Stassen
Alex Gemmell wrote: snip The error I get whichever way I tried it was the same: [ERROR] Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\alexg\newcs\phpinc\status-Trans.php on line 72 [/ERROR] The line number always correlated to this bit of PHP code:

Re: Rewriting subquery for old MySQL - SOLVED

2005-11-30 Thread Alex Gemmell
Michael Stassen wrote: Alex Gemmell wrote: snip Thanks Shawn but I couldn't seem to get this to work. I made the point of checking the MySQL User that PHP connects with. I gave it CREATE and DROP privilages on the database schema in question. It previously only had SELECT privilages.

Re: Newbie Question on Update

2005-11-30 Thread Michael Stassen
Kraer, Joseph wrote: I am trying to update a couple of rows in a table by doing the following: update table set column5 = number1 where column 1 = number2 and column1 = number3 This appears to be correct syntax. but it is not working. We can't help you if you don't tell us what you mean

RE: Newbie Question on Update

2005-11-30 Thread ISC Edwin Cruz
I guess that the problem is the reserved word table Try it: Update `table` Set column5=number1 where column 1 = number2 and column1 = number3 But the sintax is ok Regards! -Mensaje original- De: Kraer, Joseph [mailto:[EMAIL PROTECTED] Enviado el: Miércoles, 30 de Noviembre de 2005

Re: Newbie Question on Update

2005-11-30 Thread SGreen
Kraer, Joseph [EMAIL PROTECTED] wrote on 11/30/2005 11:58:56 AM: I am trying to update a couple of rows in a table by doing the following: update table set column5 = number1 where column 1 = number2 and column1 = number3 but it is not working. I tried listing the conditions separated

RE: Newbie Question on Update

2005-11-30 Thread mel list_php
Hi, In your query you try to update on the condition column 1 = number2 and column1 = number3. I think what you want is column 1 = number2 or column1 = number3 . If you use and it will try and found a record in column which has a value = number2 and at the same time = number3. hth, melanie

RE: Newbie Question on Update

2005-11-30 Thread Kraer, Joseph
Thank you, Shawn, for understanding what I meant and for explaining the issue so clearly. I apologize to all others if I wasn't clear enough, but, yes, I wanted to update two separate rows. Now, I understand why an OR is needed; I'll study the other option too. Thank you, Joseph Tito Kraer

Re: about innodb_safe_binlog option

2005-11-30 Thread Gleb Paharenko
Hello. It is not listed at: http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html And we have innodb_safe_binlog is not needed from 5.0.3 on. at: http://dev.mysql.com/doc/refman/5.0/en/innodb-start.html And The implementation make the innodb_safe_binlog system variable

Re: locking issues

2005-11-30 Thread Gleb Paharenko
Hello. Have a look here: http://dev.mysql.com/doc/refman/5.0/en/converting-tables-to-innodb.html http://dev.mysql.com/doc/refman/5.0/en/innodb-restrictions.html PaginaDeSpud wrote: i'm using myisam. Is there any tip i should know before to migrate this table to innodb ?

Re: Newbie question: UPDATE

2005-11-30 Thread Gleb Paharenko
Hello. I'm not a PHPMyAdmin guru, but at least LOAD DATA LOCAL feature (if it is present in PHPMyAdmin) can be disabled due to some security reasons. See: http://dev.mysql.com/doc/refman/5.0/en/load-data-local.html Joe Herman wrote: To those thinking of answering this question,

Re: Problem with symbolic link

2005-11-30 Thread Gleb Paharenko
Hello. Sorry for a such delayed reply. Very often similar errors are caused by low value of open_files_limit system variable. Increase it as much as possible and if the problem disappears, decrease it gradually. If this doesn't help, check if the problem remains on the latest release.

Re: problem with mysqld

2005-11-30 Thread Gleb Paharenko
Hello. General information about solving such issues is available at: http://dev.mysql.com/doc/refman/5.0/en/starting-server.html Vemuramesh wrote: DEar hai this vemu ramesh we r using the CRM application that is developed by LAMP when i install the that application it

Re: minimum processes at startup

2005-11-30 Thread Gleb Paharenko
Hello. CONNECT_PRIOR is the right value? Sorry, but right value for what? It is not number of threads, it is priority. It was only for example. MySQL 4.* has only one(!) thread/process. Why? MySQL 5 has more again. Did you make your experiments on the same machine or different,

Save HTML code

2005-11-30 Thread LMS
Hi, I can't save this: UPDATE [table] SET [filed]=' textarea name={ID_CAMPO} cols=45 rows=4 class=txts id={ID_CAMPO}{ID_VALOR}/textarea' WHERE id = [n]; in a VARCHAR(255) field, it only saves: textarea name={ID_CAMPO} cols=45 rows=4 class=txts

Re: Date increment

2005-11-30 Thread Peter Brawley
Peter Is there any function in MySQL that adds days to a date? See ADDDATE(...) at http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html. PB - Peter Lauri wrote: Best group member, I have a field called expiredate of type date. I would like to add 17

Re: Newbie Question on Update

2005-11-30 Thread Peter Brawley
Joseph update table set column5 = number1 where column 1 = number2 and column1 = number3 but it is not working. I tried listing the conditions separated by commas (where column 1 = number2, column1 = number3) and also didn't work. What am I doing wrong? No commas in the WHERE clause. WHERE ...

RE: Windows - logging into MySQL

2005-11-30 Thread Beauford
This is why lists like this get a bad name. First off, these instructions are for 4.1. Secondly. What makes you think I haven't read the instructions or searched extensively on Google etc. Either give a proper answer or just shut your mouth. Never mind anyone responding, I'll find my own damn

Re: Windows - logging into MySQL

2005-11-30 Thread Matt Monaco
Well stupid questions are usually responded to with simple answers like rtfm. You'd think you'd be able to at least be able to install a version of the daemon that's still supported before you get into advanced topics like mysql -h Beauford [EMAIL PROTECTED] wrote in message news:[EMAIL

RE: Windows - logging into MySQL

2005-11-30 Thread Logan, David (SST - Adelaide)
Sorry Beauford, The url that Shawn gave you is valid for the version you quoted. There hasn't been much change and they work just as well. This is also the earliest documentation that now exists on the website. What is the bad name this list has gained? I've found it helpful on numerous

RE: Windows - logging into MySQL

2005-11-30 Thread Beauford
I have already changed the PW for root and I can log in no problem with mysql -p root, but I can also get in with just mysql. Someone mentioned about anonymous access, I'll have to check on that. 4.0 and above give me an error that permission is denied for [EMAIL PROTECTED] I am not using an

RE: Windows - logging into MySQL

2005-11-30 Thread Beauford
There are always idots like Shawn Green that give BS answers just for the sake of responding, and for me it just reflects badly on the group as a whole. There are many others that help, but when I open my email and this is the first response I see, it just gets under my skin. FYI. I have posted

RE: Windows - logging into MySQL

2005-11-30 Thread J.R. Bullington
You need to be careful what you write. I have found that Shawn is one of the best guys on this list. His answers are 99% right on target (1% because not enough information was given) and can help on every version of db out there. Don't start a flame war because your feelings were hurt. Grow up.

RE: Windows - logging into MySQL

2005-11-30 Thread Beauford
Sorry, but I don't take kindly to idiots. I don't care if he's gods gift to MySQL. If there isn't enough info for him to give an informed answer then he should either ask for more or shut up. I'm just simply trying to resolve a problem, and flip answers aren't needed or appropriate. I don't send

Re: Windows - logging into MySQL

2005-11-30 Thread sean c peters
Clearly you don't read instructions as well as you'd like us to think. As has been pointed out by numerous people, the instructions that were suggested to are applicable to the version of MySQL that you are running (3.2.3) I followed the link suggested to you, and it took me a whole second to

Problem with MySQL 5 on OS X Tiger

2005-11-30 Thread untz
Hello there, I just downloaded the MySQL 5 Community Edition for OS X Tiger... Ran the installer and it installed everything to /usr/local/ ... Updated my .bash_profile by creating a MYSQL_HOME variable and appending that MYSQL_HOME/bin to the PATH variable... Now, the problem is that when

optimizing mysqldump

2005-11-30 Thread Anthony Ettinger
I'm using the typical --opt with mysqldump, over the internet. the problem I'm having is the dump takes 30 mins or so, and during that time, every table in the db is locked (so as not to throw it out of sync). How can I optmize this? I'm trying to come up with a centralized database backup tool,

Re: Problem with MySQL 5 on OS X Tiger

2005-11-30 Thread Lachlan Mulcahy
Hi Unnsse, Here's the problem at hand: Raven:~ untz$ mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) Can anyone tell me what possibly I am doing wrong? The message you are getting is saying that there is no socket file at

RE: optimizing mysqldump

2005-11-30 Thread Easyhorpak.com Easyhorpak.com
Very Easy Man. Use this scripts... http://www.silisoftware.com/scripts/?scriptname=backupDB It 's powerful. Please feel free to reply to this email if you have additional questions or concerns ªÇ¹ ¨Ø´ÒºØµÃ 01-7499093 Manager Easyhorpak.com

Re: optimizing mysqldump

2005-11-30 Thread Cal Evans
If your servers is Linux based try running mysqldump locally on the server via ssh. Then you can zip it up and transfer it over. =C= | | Cal Evans | http://www.calevans.com | Anthony Ettinger wrote: I'm using the typical --opt with mysqldump, over the internet. the problem I'm having is the

Re: Windows - logging into MySQL

2005-11-30 Thread Stephen Cook
His answer was correct, and somewhat politer than RTFM. As for finding your own damn answers, see again Mr. Green's original reply. Beauford wrote: Sorry, but I don't take kindly to idiots. I don't care if he's gods gift to MySQL. If there isn't enough info for him to give an informed

Re: Problem with MySQL 5 on OS X Tiger

2005-11-30 Thread Michael Stassen
Lachlan Mulcahy wrote: Hi Unnsse, Here's the problem at hand: Raven:~ untz$ mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) Can anyone tell me what possibly I am doing wrong? The message you are getting is saying that there is no

Newbie help with MySQL

2005-11-30 Thread untz
Hello there, I am running MySQL 5 Community Edition on Mac OS X Tiger Here's what I did: 1. Ran the MySQL server from System Preferences 2. Launched Terminal and typed in the following: untz$ mysql -u root -p 3. Was prompted for my password, and after entering that in, I received this

RE: Newbie help with MySQL

2005-11-30 Thread Logan, David (SST - Adelaide)
Hi, Try with mysql -u root first, the installation process doesn't create a password. You can then use mysqladmin -u root password 'newpassword' to set it. You can find out all about the security/permissions system here : http://dev.mysql.com/doc/refman/5.0/en/privilege-system.html Regards