Re: Functions and NULL with standard install

2007-03-26 Thread Shawn Green
Hello Lucas, [EMAIL PROTECTED] wrote: I don't see how to use this here, I will have to research the |/||/| select rpad(|IFNULL(|null, ''),5,'1'); |/||/| The function you want to use is IFNULL() documented here:http://dev.mysql.com/doc/refman/5.0/en/control-flow-functions.html Try it

Re: Functions and NULL with standard install

2007-03-21 Thread Lucas . CTR . Heuman
I don't see how to use this here, I will have to research the |/||/| select rpad(|IFNULL(|null, ''),5,'1'); |/||/| but this below works thank you SELECT RPAD(CASE WHEN NULL IS NULL THEN '' ELSE '2' END, 5, '1'); If you are using it on an actual field, you would replace the first NULL and t

Re: Functions and NULL with standard install

2007-03-21 Thread Francesco Riosa
select rpad(|IFNULL(|null, ''),5,'1'); |/||/| [EMAIL PROTECTED] ha scritto: I am running a basic install of MySQL 5.0 with "strict mode" turned on I would like to use RPAD however at times a NULL var will be sent to the function. My goal is to have a function that will convert the NULL to a

Re: Functions and NULL with standard install

2007-03-21 Thread Joshua Marsh
On 3/21/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: I am running a basic install of MySQL 5.0 with "strict mode" turned on I would like to use RPAD however at times a NULL var will be sent to the function. My goal is to have a function that will convert the NULL to a blank string to get th

RE: functions in AS

2006-06-08 Thread Jay Blanchard
[snip] SET @sql=CONCAT('SELECT SUM(IF(SUBSTRING(updated,1,10)=CURDATE(), 1, 0)) AS ',     char(39),     CURDATE(),     CHAR(39),     ' FROM tablename GROUP BY group by psDealer' ); PREPARE stmt FROM @sql; [/snip] Very clever Peter! Thanks for your he

Re: functions in AS

2006-06-07 Thread Peter Brawley
Jay, [snip] We all know that you cannot do something like this; sum(if(substring(updated, 1, 10) = curdate(), 1, 0)) AS curdate() nor can you use user variables even though they get set properly set @d1 = curdate(); sum(if(substring(updated, 1, 10) = curdate(), 1, 0)) AS @d1 So, do

RE: functions in AS

2006-06-07 Thread Jay Blanchard
[snip] >We all know that you cannot do something like this; >sum(if(substring(updated, 1, 10) = curdate(), 1, 0)) AS curdate() >nor can you use user variables even though they get set properly >set @d1 = curdate(); >sum(if(substring(updated, 1, 10) = curdate(), 1, 0)) AS @d1 >So, does anyone know o

Re: functions in AS

2006-06-07 Thread Peter Brawley
Jay, We all know that you cannot do something like this; sum(if(substring(updated, 1, 10) = curdate(), 1, 0)) AS curdate() nor can you use user variables even though they get set properly set @d1 = curdate(); sum(if(substring(updated, 1, 10) = curdate(), 1, 0)) AS @d1 So, does anyone know of a w

Re: functions md5, crypt

2005-03-22 Thread Gleb Paharenko
Hello. See: http://dev.mysql.com/doc/mysql/en/encryption-functions.html symbulos partners <[EMAIL PROTECTED]> wrote: > Dear friends, > > where is the description of the functions md5 in the manual? where is the > description of the function crypt()? > > are there are good altern

Re: functions md5, crypt

2005-03-21 Thread Martijn Tonies
Please stop writing "high priority" e-mails to a mailinglist. Although the problem might be important for you, it's in no way important for the receiver (which is quite a lot of people). People will answer mailinglist questions for free, in their time. I hope you understand. -- Martijn Tonies

Re: functions md5, crypt

2005-03-21 Thread symbulos partners
On Monday 21 Mar 2005 16:32, Michael Stassen wrote: > Which is the first hit if you enter "md5 crypt" in the manual's search box. I use the manual offline, because my connection is too slow. I wonder why the encryption-function chapter is not in my manual. -- symbulos partners -.- symbulos - et

Re: functions md5, crypt

2005-03-21 Thread Michael Stassen
Tom Crimmins wrote: On Monday, March 21, 2005 09:27, symbulos partners wrote: Dear friends, where is the description of the functions md5 in the manual? where is the description of the function crypt()? are there are good alternatives? http://dev.mysql.com/doc/mysql/en/encryption-functions.html Whi

RE: functions md5, crypt

2005-03-21 Thread Tom Crimmins
On Monday, March 21, 2005 09:27, symbulos partners wrote: > Dear friends, > > where is the description of the functions md5 in the manual? where is > the description of the function crypt()? > > are there are good alternatives? http://dev.mysql.com/doc/mysql/en/encryption-functions.html -- T

RE: Functions and Procedures in Mysql

2003-11-25 Thread Mike Hillyer
To: mike > Cc: [EMAIL PROTECTED] > Subject: Re: Functions and Procedures in Mysql > > > In the last episode (Nov 25), mike said: > > >wanted to know if one can write a Function or a procedure in a mysql > > >4.0.12..??? > > > > This is not going to be supported

Re: Functions and Procedures in Mysql

2003-11-25 Thread Dan Nelson
In the last episode (Nov 25), mike said: > >wanted to know if one can write a Function or a procedure in a mysql > >4.0.12..??? > > This is not going to be supported until MySQL 5. Mysql has supported user-defined functions since 3.21. http://www.mysql.com/doc/en/Adding_functions.html --

Re: Functions and Procedures in Mysql

2003-11-25 Thread mike
>wanted to know if one can write a Function or a procedure in a mysql 4.0.12..??? This is not going to be supported until MySQL 5. >Also about this data dump, i went to C:\ and typed mysqldump test. .. this thing ran >for quite some time but where was the dump finally could figure that out ..

RE: Functions and Procedures in Mysql

2003-11-25 Thread Swati K
thanks... -Original Message- From: Mikael Fridh [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 25, 2003 4:23 PM To: Swati K; [EMAIL PROTECTED] Subject: Re: Functions and Procedures in Mysql Regarding your mysql dump If you did not redirect standard output (mysqldump test

Re: Functions and Procedures in Mysql

2003-11-25 Thread Mikael Fridh
Regarding your mysql dump If you did not redirect standard output (mysqldump test > dumpfile.sql), it did not go anywhere. Mike On Tuesday 25 November 2003 11.46, Swati K wrote: > Hi People, > > wanted to know if one can write a Function or a procedure in a mysql > 4.0.12..??? > Also about this

Re: Functions and Procedures in Mysql

2003-11-25 Thread Martijn Tonies
Hi, > wanted to know if one can write a Function or a procedure in a mysql > 4.0.12..??? No, MySQL 5 is supposed to support this. Another note: When writing to a mailinglist, please don't say your post is "urgent". You're sending your message to hundreds of people that decide themselves if your

RE: Functions

2003-09-08 Thread Fortuno, Adam
Gustavo, Prefix them with 'SELECT ;' (e.g. 'SELECT VERSION();'). Regards, Adam -Original Message- From: Gustavo Castro [mailto:[EMAIL PROTECTED] Sent: Monday, September 08, 2003 10:03 AM To: [EMAIL PROTECTED] Subject: Functions Hello, in order to call a native function do i have to add

Re: Functions as default values

2003-08-14 Thread Cybot
I am trying to use a function as a default value for a column but do not seem to get the desired result. I want to use the NOW() function for a last_updated column, here is my code... CREATE TABLE test_table ( last_updated datetime NOT NULL default `NOW()` ) TYPE=MyISAM; This gives an error; CRE

RE: Functions as default values

2003-08-06 Thread Phil Ewington - 43 Plc
No functions as default values is a bummer, but timestamp will do he trick, so thanks for your help; much appreciated. Phil. -Original Message- From: Cybot [mailto:[EMAIL PROTECTED] Sent: 06 August 2003 15:37 To: [EMAIL PROTECTED] Subject: Re: Functions as default values > I am try

Re: functions

2003-07-27 Thread colbey
Also keep in mind.. even if for example PHP was faster with certain functions.. Take that time + the time to pull the data from mysql and set it up for manipulation via PHP could be more than asking mysql to do all the work and just return a small resultset.. Just use a simple timer class to writ

Re: functions

2003-07-27 Thread Dan Nelson
In the last episode (Jul 27), Doruk Fisek said: > I am developing applications using PHP and MySQL. > > There are various functions in MySQL that is also implemented in > PHP. Such as date arithmetic, string, numeric, etc... > > Do I get better performance if I do them in MySQL (or PHP) and w

Re: functions

2002-04-22 Thread Bruce Lewis
IL PROTECTED]> Sent: Monday, April 22, 2002 3:17 PM Subject: Re: functions > For NT and 2000 machines, use the AT command if you want a command line > scheduler. The syntax is actually different between them though. > > I found that it is actually easier to schedule a process to sch

Re: functions

2002-04-22 Thread Opus
For NT and 2000 machines, use the AT command if you want a command line scheduler. The syntax is actually different between them though. I found that it is actually easier to schedule a process to schedule other processes instead of having the process schedule itself again. The FOR command in

Re: functions

2002-04-22 Thread Rodney Broom
Good morning Daniel, From: Daniel Jarrett <[EMAIL PROTECTED]> > ...for mysql to perform daily operations.. You bet, it's called 'cron'. MySQL doesn't have anything like scheduling built in. And, arguably, it shouldn't. Since that type of functionality is the responsibility of the operating

RE: functions in mysql again

2002-04-12 Thread Peter Romianowski
this means that the select-statement did not return a row. try printing out the select-statement and execute it on the command-line. and add a "if ($result) {..." before using the result set. and: try finding a php-list. :-) > -Original Message- > From: Alia Mikati [mailto:[EMAIL PROTECT

Re: Functions as default values

2001-09-24 Thread Rodney Broom
From: Gerald Clark <[EMAIL PROTECTED]> > Default values must be constants. > Håkan Elmqvist wrote: > > Now I want to register who changed it... ===> MY two cents worth: With MySQL, this sort of thing usually gets handled in a piece of software. In Perl, we might say something like: $sth =

Re: Functions as default values

2001-09-24 Thread Gerald Clark
You can't. Default values must be constants. Håkan Elmqvist wrote: > Timestamp is a useful datatype when you want to register when a record > changed. Now I want to register who changed it and tried to use user() > as a default value and my database just returned user() as the field > value.