Re: Calculate elapsed time between 2 time/dates

2003-03-13 Thread Sankaranarayanan Mahadevan
you can use any programmin language to manipulate...
i did the following in PHP...

//###
//  Function to calculate remaining days, hours,
minutes and seconds between current date and end
date..
//  Returns the remaining time .. in days or hrs or
mins or secs...
//###
function
CalRemTime($ClosingDay,$ClosingMonth,$ClosingYear)
{
$ClosingTime =
mktime(24,60,60,$ClosingMonth,$ClosingDay,$ClosingYear);
$TimeDifference = $ClosingTime - time();

$RemainingDays = ($TimeDifference - ($TimeDifference
% 86400)) / 86400;
$TimeDifference = $TimeDifference - ($RemainingDays *
86400);
$RemainingHours = ($TimeDifference - ($TimeDifference
% 3600)) / 3600;
$TimeDifference = $TimeDifference - ($RemainingHours
* 3600);
$RemainingMinutes = ($TimeDifference -
($TimeDifference % 60)) / 60;
$TimeDifference = $TimeDifference -
($RemainingMinutes * 60);
$RemainingSeconds = ($TimeDifference -
($TimeDifference % 1)) / 1;

if($RemainingDays0)
{
$sValue = $RemainingDays days;
return $sValue;
}
else
{
if($RemainingHours0)
{
$sValue = $RemainingHours hrs:$RemainingMinutes
mins:$RemainingSeconds Secs;
return $sValue;
}
else
{
if($RemainingMinutes0)
{
$sValue = $RemainingMinutes
mins:$RemainingSeconds Secs;
return $sValue;
}
else
{
if($RemainingSeconds0)
{
$sValue = $RemainingSeconds secs;
return $sValue;
}
else
{
$sValue = Bidding time is over...;
return $sValue;
}
}
}
}
}


Shankar
--


--- Roger Baklund [EMAIL PROTECTED] wrote:
 * YC Nyon
  I need to get the time/date (ie. 1 day 12 hours 11
 min 4sec)
  between 2 time dates.
  Can't seem to find any of these functions in the
 Mysql manual. The nearest
  was Period_diff() which is calculating months
 elapsed.
 
 I don't think you can do it directly, you have to
 split the day and time
 part, and calculate the two things separately: The
 number of days between
 the two dates AND the difference in the
 HH:MM:SS-part of the two dates.
 
 HTH,
 
 --
 Roger
 
 

-
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list
 archive)
 
 To request this thread, e-mail
 [EMAIL PROTECTED]
 To unsubscribe, e-mail

[EMAIL PROTECTED]
 Trouble unsubscribing? Try:
 http://lists.mysql.com/php/unsubscribe.php
 


__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Testing the Server Load

2002-12-22 Thread Sankaranarayanan Mahadevan
Dear All,

we have developed a web-based application for a client
and now in its testing phase by next week...
It uses Linux/PHP 4/MySQL 3.23

As the volume of user will be more, we are very much
concerned about the server efficiency and our
application efficiency/performance...

Following are the one we need to database server...
1. server performance
2. the database load
3. efficiency query
4. execution time 
5. how many inserts/updates taking place
6. volume of data involved
and so on...

Is there any tools available for this?
Any idea about testing the mysql server?

Thanks a lot.

Shankar


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




server load

2002-12-21 Thread Sankaranarayanan Mahadevan
hi
we have developed for a client and now its testing
phase by next week...
using Linux/PHP/MySQL 3.23
we need to test the database load...
like how efficienty query is executing...
how many inserts..updataes taking place...etc...
how much the data etc...
is there any tools available for this?
any idea?

Shankar

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




LIMIT problem when no record

2002-11-22 Thread Sankaranarayanan Mahadevan
Hi,

i faced a problem when using LIMIT clause in select
statement..
select * from Discussion Where ParentID=x Order By
DatePosted Desc LIMIT 1
iam using the above select statement inside a loop
where ParentID varies...
when u run that program, suddenly mysql stopped and
said mysql-opt error 
then i found out that when there is no record with the
above criteria, it is giving error and mysql stops
abruptly...
when there is no record and if i remove LIMIT clause,
then no problem.. fine...
but i donno when there will be record or when there
won't be as i am running inside loop...
any idea?

Shankar


__
Do you Yahoo!?
Yahoo! Mail Plus – Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Importing diff format date to MySQL

2002-10-11 Thread Sankaranarayanan Mahadevan

Hi,

I have data in CSV format file which has a date value
in the format 'dd/mm/yy'?
When i used 'Load data...' to import to a MySQL table,
all the fields gets the value from the file except the
date field that contains the date of birth??
is there any way to format and import???

Thanks
Regards
Shankar

__
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos  More
http://faith.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Importing data from Oracle

2002-05-21 Thread SankaraNarayanan Mahadevan

Hi,

I am having two servers running Oracle and MySQL
database.

Views has been created for me in Oracle and I want to
import data from that Oracle table to my MySQL table.

I want a script like something main thing is I
want to import data from that Oracle database to MySQL
daily...like a scheduled job..

The mysqlimport statement imports data only from text
filesbut in my case i want to run a scheduled
script that imports data from Oracle to MySQL at a
specified time... I am using MySQL version 3.23.22 

Is there any tool available for free or any other way
to do this..Please help me.

Shankar



__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




MySQL stops suddenly

2002-04-03 Thread SankaraNarayanan Mahadevan

Hi,

I have MySQL 3.23 installed in Windows 2000 Server 4
days ago. It runs as a service of the server. It was
working fine.
But now it stops abrubtly. When I run the PhpMyAdmin
from the browser it says the following :
--
Error   
MySQL said:

Go Back
--

It does not say anything else...

I ahve a doubt that it shuts down by itself after a
specific period of time..
Is there any such options???

What is that I need to do?

Thanks in advance.

Shankar


__
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Running MySQL as Service on 2000 Server

2002-03-08 Thread SankaraNarayanan Mahadevan


Hi,

I am also facing the same problem...in Win2K
When i try to run in from the service, it says some
error
so i referred to some sites...and just using the
command line as standalone

Also i acould not run apache as a service...
I could not see it under services...

Any way to start these under service...

Shankar

--- [EMAIL PROTECTED] wrote:
 Hi,
 
 Anybody running MySQL on Win 2000 server here?
 
 I just installed MySQL 3.23.49-MAX (w/ InnoDB) on a
 2000 Server (Dual 1.1
 GHz - 1GB RAM - 15GB HD space) and I can run it
 without any problem from
 the command line as a standalone. However I couldn't
 run it as a service
 even though I already did 'mysqld-max-nt --install'
 the first time I ran
 it. Is there anything wrong with MySQL or is it more
 of permission issue on
 NT/2000 server.
 
 I also attached the my.ini file if it would help.
 Thanks.
 
 
 Regards,
 Martin
 
 [mysqld]
 basedir=G:/MySQL
 datadir=G:/MySQL/data
 #bind-address=
 log-slow-queries=h:/slowquery/slowquery.log
 set-variable=key_buffer=20M
 innodb_data_home_dir = g:/ibdata
 innodb_data_file_path = ibdata:2000M;ibdata2:2000M
 set-variable = innodb_buffer_pool_size=200M
 set-variable = innodb_additional_mem_pool_size=30M
 innodb_log_group_home_dir = h:/iblogs
 innodb_log_arch_dir = h:/iblogs
 innodb_log_archive=0
 set-variable = innodb_log_files_in_group=3
 set-variable = innodb_log_file_size=30M
 set-variable = innodb_log_buffer_size=24M
 innodb_flush_log_at_trx_commit=1
 set-variable = innodb_file_io_threads=10
 set-variable = innodb_lock_wait_timeout=50
 [WinMySQLAdmin]
 Server=G:/MySQL/bin/mysqld-max-nt.exe
 
 
 
 
 
 
 **Disclaimer**
 This  Memo and any attachments, may be confidential
 and legally privileged.
 If  you  are  not  the  intended recipient and have
 received this in error,
 kindly  destroy  this  message  and  notify the
 sender.  Thank you for your
 assistance.
 
 

-
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list
 archive)
 
 To request this thread, e-mail
 [EMAIL PROTECTED]
 To unsubscribe, e-mail

[EMAIL PROTECTED]
 Trouble unsubscribing? Try:
 http://lists.mysql.com/php/unsubscribe.php
 


__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




urgent : Problem in Group by clause

2002-02-16 Thread SankaraNarayanan Mahadevan

hi all,

i have a problem in mysql query...
lemme state the scenario...

i have a table 'UploadDetails' in which i am storing
data regd files...

the fields are:
FileName, Title, Designer, UploadedBy, SubmittedDate

i want to get details about whose files are designed
by who..etc...
that is i need to use group by in select statement..

i want to display the details in the web page ...

say there are 3 records as below against each field:
1. 'a.jpg','test','david','john','2002-02-14'
2. 'b.bmp','bmp file','richard','mary','2002-02-14'
3. 'c.htm','web','david','mary','2002-02-15'


now i want to display the details grouped by Designer
(the third field).

when i use the following query:

select
FileName,Title,Designer,UploadedBy,SubmittedDate
From UploadDetails
Group By Designer

i get only one row...

why?

can anyone solve this problem...

thanks in advance

Shankar

__
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




urgent : Problem in Group by clause

2002-02-16 Thread SankaraNarayanan Mahadevan

hi all,

i have a problem in mysql query...
lemme state the scenario...

i have a table 'UploadDetails' in which i am storing
data regd files...

the fields are:
FileName, Title, Designer, UploadedBy, SubmittedDate

i want to get details about whose files are designed
by who..etc...
that is i need to use group by in select statement..

i want to display the details in the web page ...

say there are 3 records as below against each field:
1. 'a.jpg','test','david','john','2002-02-14'
2. 'b.bmp','bmp file','richard','mary','2002-02-14'
3. 'c.htm','web','david','mary','2002-02-15'


now i want to display the details grouped by Designer
(the third field).

when i use the following query:

select
FileName,Title,Designer,UploadedBy,SubmittedDate
From UploadDetails
Group By Designer

i get only one row...

why?

can anyone solve this problem...

thanks in advance

Shankar

__
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




How to set CD as autorun

2002-01-06 Thread SankaraNarayanan Mahadevan

Hi,

I have developed an application in PHP/MySQL in Linux
environment. I need to burn it in a CD and give it to
the client. I need to do one thing - that is when the
client insert that CD automatically my setup should
run. How to do that...?

what sort of coding i need to do ..? is it that i need
to code in linux..?

thanks...



__
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Null Value In a Column

2001-12-30 Thread SankaraNarayanan Mahadevan

Hi,

I want to select record from a table that return empty
string or something else that i want, if a column
contains null value.

can we do that in a select statement.

I tried IsNUll function but it return wither 1 or 0.
In MS SQL Server u got a function IsNULL that accepts
2 parameter -  first the column name, second the value
to be returned if that column contain null value.

Is there any function MySQL?


Shankar


__
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Recordset

2001-12-27 Thread SankaraNarayanan Mahadevan

Hi,

I am connecting MySQL in Linux server through Visual
Basic in windows.

When i used the recordset to select a record,
the RecordCount method returns -1 even there is record
in the table.

following is the connection string i used
Provider=MSDASQL.1;Persist Security Info=False;Data
Source=MMLSConn

Also i used adOpenKeyset and adLockOptimistic.

shankar


__
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Case Sensitivity in MySQL

2001-12-26 Thread SankaraNarayanan Mahadevan

Hi,

I have a situation as follows:

There is a table that stores the user name.
One user name is 'David' and another is 'david'
I want to select only the user with the name
'david'(all small and not 'David')

MySQL is case insensitive in selecting records...
how to make it case-sensitive in selecting records...

shankar 


__
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Case sensitive in selecting records

2001-12-26 Thread SankaraNarayanan Mahadevan

Hi,

I have a situation as follows:

There is a table that stores the user name.
One user name is 'David' and another is 'david'
I want to select only the user with the name
'david'(all small and not 'David')

MySQL is case insensitive in selecting records...
how to make it case-sensitive in selecting records...

shankar 



__
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php