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
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
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
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
[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
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
[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
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
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
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
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
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
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
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
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
--
>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 ..
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
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
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
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
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
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
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
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
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
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
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
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
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 =
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.
30 matches
Mail list logo