Hi All,
I seem to be having a problem with the resolution using the timestamp
function. I am accessing the database snort on an ACID/SNORT/MySQL
installation utilizing a collection of shell scripts that are run as
cron jobs and function as a bot adding and removing firewall rules
(iptables).
Hi All,
I seem to be having a problem with the resolution using the timestamp
function. I am accessing the database snort on an ACID/SNORT/MySQL
installation utilizing a collection of shell scripts that are run as
cron jobs and function as a bot adding and removing firewall rules
(iptables).
Nick Sinclair wrote:
[.] WHERE date_format(timestamp, '%Y-%m-%d %T')
=DATE_SUB(CURDATE(),INTERVAL $BLACKLIST_DECAY HOUR)
* ...It only resolves to the DAY and not an hourly resolution. I have
included a script below that I use for debugging, the MySQL
functionality is taken directly from one
Jigal van Hemert wrote:
Nick Sinclair wrote:
[.] WHERE date_format(timestamp, '%Y-%m-%d %T')
=DATE_SUB(CURDATE(),INTERVAL $BLACKLIST_DECAY HOUR)
* ...It only resolves to the DAY and not an hourly resolution. I have
included a script below that I use for debugging, the MySQL
functionality
Hello,
I need the ability to round off dollar amounts to the
nearest 100th of a dollar amount, IE $14.9564 to $14.96 or
$132.1123 to $113.11
can this be accomplished with MySQL SQL function ??
TIA
--
MikemickaloBlezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
At 16:34 -0600 11/22/03, Mike Blezien wrote:
Hello,
I need the ability to round off dollar amounts to the nearest 100th
of a dollar amount, IE $14.9564 to $14.96 or $132.1123 to $113.11
can this be accomplished with MySQL SQL function ??
Sounds like a job for TRUNCATE().
Thanks Paul.
but I think the function I was looking for was ROUND(X,D),
the TRUNCATE(X,D) just 'trims' it :)
IE using the value 123.336 and I needed it to round off to
123.34 in this case.
mysql select truncate(123.336,2);
+-+
| truncate(123.336,2) |
Hi!
Use the round() function.
round(14.9564, 2) = 14.96
round(32.1123, 2) = 113.11
Bye
Hello,
I need the ability to round off dollar amounts to the nearest 100th
of a dollar amount, IE $14.9564 to $14.96 or $132.1123 to $113.11
can this be accomplished with MySQL SQL function ??
--