How to delete records after particular position ?

2004-08-24 Thread Manisha Sathe
Hi,

Here i am again. I can select particular record by using 

LIMIT 9,1

But e.g. if i want to delete this record  then how shall i do ? I tried to use 

Delete from table name  Limit 9, 1

But i am getting erorr. pls can anybody let me know the exact syntax for this ?

regards
Manisha



 



How to get the last record from the slected record set

2004-08-23 Thread Manisha Sathe
I am having more than 10 records in a table. I want to select only first top 10 
records (depending on one field score) and then want to select 10th position record.

select * from table1 order by score desc LIMIT 10

This will give me 10 records but then how to get the last record ?

Thanks in advance,

regards
Manisha 


Re: How to get the last record from the slected record set

2004-08-23 Thread Manisha Sathe
I want to select first 10 records out of 100. And then get the 10th
position.

If i make use of

order by score asc limit 1

then I will get 100th record, How shall i pick up 10th position?

regards
Manisha


- Original Message -
From: Karl Pielorz [EMAIL PROTECTED]
To: Manisha Sathe [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, August 23, 2004 8:34 PM
Subject: Re: How to get the last record from the slected record set




 --On 22 August 2004 20:31 +0800 Manisha Sathe [EMAIL PROTECTED]
 wrote:

  I am having more than 10 records in a table. I want to select only first
  top 10 records (depending on one field score) and then want to select
  10th position record.
 
  select * from table1 order by score desc LIMIT 10
 
  This will give me 10 records but then how to get the last record ?

 order by score asc limit 1

 [i.e. turn it around and pick the 1st (which will be the last because it's
 ordered the other way)]

 :-)

 -Kp

 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: How to get the last record from the slected record set

2004-08-23 Thread Manisha Sathe
yes, but is there any better way of doing it ?

regards
Manisha


- Original Message -
From: Karl Pielorz [EMAIL PROTECTED]
To: Manisha Sathe [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, August 23, 2004 8:34 PM
Subject: Re: How to get the last record from the slected record set




 --On 22 August 2004 20:31 +0800 Manisha Sathe [EMAIL PROTECTED]
 wrote:

  I am having more than 10 records in a table. I want to select only first
  top 10 records (depending on one field score) and then want to select
  10th position record.
 
  select * from table1 order by score desc LIMIT 10
 
  This will give me 10 records but then how to get the last record ?

 order by score asc limit 1

 [i.e. turn it around and pick the 1st (which will be the last because it's
 ordered the other way)]

 :-)

 -Kp

 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: How to get the last record from the slected record set - Thanks

2004-08-23 Thread Manisha Sathe
Thanks to all of, I could get it

Thanks
Manisha





- Original Message -
From: Karl Pielorz [EMAIL PROTECTED]
To: Manisha Sathe [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, August 23, 2004 9:52 PM
Subject: Re: How to get the last record from the slected record set




 --On 22 August 2004 21:05 +0800 Manisha Sathe [EMAIL PROTECTED]
 wrote:

  I want to select first 10 records out of 100. And then get the 10th
  position.
 
  If i make use of
 
  order by score asc limit 1
 
  then I will get 100th record, How shall i pick up 10th position?

 I'm not quite sure I follow what you're aiming for, but have you tried...

 limit 10,1

 i.e. return 1 record, starting at row 10 in the result set. Beyond that
 you'd have to explain what 'score' is, as it's getting a little
 confusing... :)

 -Kp


 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Compare dates

2003-11-24 Thread Manisha Sathe
I have a table with start_date (date), end_date (date), rate(float) as 3 fields, I 
want to compare today's date with start and end date if it is inside this range then 
pick up the corresponding rate.

But how mysql  stores dates ? (-MM-DD ?) how can i compare with today's date ? I 
tried some different combinations but in not successful.

regards,
manisha


Re: PASSWORD() function problem

2003-10-16 Thread Manisha Sathe
thanks all, it works (i just increase it to 20)
but one more thing, now if i want to get this password (e.g for option
forget password), can we retrieve, i believe we can not- just want to
confirm

manisha

- Original Message -
From: Paul DuBois [EMAIL PROTECTED]
To: Manisha Sathe [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, October 15, 2003 11:05 PM
Subject: Re: PASSWORD() function problem


 At 17:26 +0800 10/15/03, Manisha Sathe wrote:
 Hi,
 
 I inserted one record thr PHPMyAdmin -  mem_pass field of member
 table set to xyz using function 'PASSWORD'
 
 Then trying to select the same - select * from member where mem_pass
 = PASSWORD('xyz') - then it is not getting selected
 
 I do not know why I am not getting the result. please help me.
 what's going wrong ?
 
 Thanks in advance
 Manisha

 Please consider using something other than PASSWORD(), as noted in the
 description for that function at:

 http://www.mysql.com/doc/en/Miscellaneous_functions.html

 PASSWORD() should not be used for your own applications.

 --
 Paul DuBois, Senior Technical Writer
 Madison, Wisconsin, USA
 MySQL AB, www.mysql.com

 Are you MySQL certified?  http://www.mysql.com/certification/


 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: PASSWORD() function problem

2003-10-16 Thread Manisha Sathe
Thanks all, it helped me a lot

Manisha
- Original Message -
From: Director General: NEFACOMP [EMAIL PROTECTED]
To: Nitin [EMAIL PROTECTED]; Manisha Sathe
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, October 16, 2003 10:56 PM
Subject: Re: PASSWORD() function problem


 Hi,
 If I remember, ENCODE() is reversible using DECODE() or something similar.

 I might be wrong, just check the manual!!!


 Thanks
 Emery

 - Original Message -
 From: Nitin [EMAIL PROTECTED]
 To: Manisha Sathe [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Thursday, October 16, 2003 16:13
 Subject: Re: PASSWORD() function problem


  all encryption functions are one way only
 
  Nitin
 
  - Original Message -
  From: Manisha Sathe [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Thursday, October 16, 2003 6:46 PM
  Subject: Re: PASSWORD() function problem
 
 
   thanks all, it works (i just increase it to 20)
   but one more thing, now if i want to get this password (e.g for option
   forget password), can we retrieve, i believe we can not- just want to
   confirm
  
   manisha
  
   - Original Message -
   From: Paul DuBois [EMAIL PROTECTED]
   To: Manisha Sathe [EMAIL PROTECTED]; [EMAIL PROTECTED]
   Sent: Wednesday, October 15, 2003 11:05 PM
   Subject: Re: PASSWORD() function problem
  
  
At 17:26 +0800 10/15/03, Manisha Sathe wrote:
Hi,

I inserted one record thr PHPMyAdmin -  mem_pass field of member
table set to xyz using function 'PASSWORD'

Then trying to select the same - select * from member where
mem_pass
= PASSWORD('xyz') - then it is not getting selected

I do not know why I am not getting the result. please help me.
what's going wrong ?

Thanks in advance
Manisha
   
Please consider using something other than PASSWORD(), as noted in
the
description for that function at:
   
http://www.mysql.com/doc/en/Miscellaneous_functions.html
   
PASSWORD() should not be used for your own applications.
   
--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
   
Are you MySQL certified?  http://www.mysql.com/certification/
   
   
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
   http://lists.mysql.com/[EMAIL PROTECTED]
   
  
  
   --
   MySQL General Mailing List
   For list archives: http://lists.mysql.com/mysql
   To unsubscribe:
  http://lists.mysql.com/[EMAIL PROTECTED]
  
 
 
 
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 
 
 



 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



PASSWORD() function problem

2003-10-15 Thread Manisha Sathe
Hi,

I inserted one record thr PHPMyAdmin -  mem_pass field of member table set to xyz 
using function 'PASSWORD'

Then trying to select the same - select * from member where mem_pass = PASSWORD('xyz') 
- then it is not getting selected

I do not know why I am not getting the result. please help me. what's going wrong ? 

Thanks in advance
Manisha