Re: Urgent Fetch and updation in single step/query

2006-04-21 Thread WEBBEE . BIZ
Hi all,
Can we run a query like UPDATE table_name set abc='1'; and still fetch the
value from a column from table .
I mean Can we run select And update query in one statement. If yes how.

Pl. tell me for versions 4.x and 5.x
Pl. do help me.
--
Regards
Abhishek Jain

On 4/20/06, abhishek jain [EMAIL PROTECTED] wrote:

 No i do not want an autoincrement key , as i want to be only one row in
 the table and it value gets incremented / updated and i to know whats its
 current value.
  --
 Regards
 Abhishek Jain


 On 4/19/06, Michael Kruckenberg  [EMAIL PROTECTED] wrote:
 
  Seems like what you need is an auto-increment key. Is that out of the
  question?
 
  On Apr 18, 2006, at 1:34 AM, abhishek jain wrote:
   Dear Friends,
   I run several processes and they need to query the mysql 5.0.8
   database
   simultaneously .I have a config table which have the record id. I
   need to
   fetch that and increment that .What I feel that the same record id is
   fetched by different simultaneosly before i update .Can anyone help
   me in
   either:
   1)telling me a single query which will fetch and incr. in the same
   query. so
   the problem of simultaneously queries are solved.
   2)A system by which delaying the other queries are done, I use PHP .
   Expecting a quick reply.
   Thanks,
   Abhishek Jain
 
 



Re: Urgent Fetch and updation in single step/query

2006-04-21 Thread Barry

WEBBEE . BIZ wrote:

Hi all,
Can we run a query like UPDATE table_name set abc='1'; and still fetch the
value from a column from table .
I mean Can we run select And update query in one statement. If yes how.

Pl. tell me for versions 4.x and 5.x
Pl. do help me.


Hmm should work with PROCEDURE in both versions.

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

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



Fwd: Fetch and updation in single step/query

2006-04-20 Thread abhishek jain
No i do not want an autoincrement key , as i want to be only one row in the
table and it value gets incremented / updated and i to know whats its
current value.
 --
Regards
Abhishek Jain


On 4/19/06, Michael Kruckenberg [EMAIL PROTECTED] wrote:

 Seems like what you need is an auto-increment key. Is that out of the
 question?

 On Apr 18, 2006, at 1:34 AM, abhishek jain wrote:
  Dear Friends,
  I run several processes and they need to query the mysql 5.0.8
  database
  simultaneously .I have a config table which have the record id. I
  need to
  fetch that and increment that .What I feel that the same record id is
  fetched by different simultaneosly before i update .Can anyone help
  me in
  either:
  1)telling me a single query which will fetch and incr. in the same
  query. so
  the problem of simultaneously queries are solved.
  2)A system by which delaying the other queries are done, I use PHP .
  Expecting a quick reply.
  Thanks,
  Abhishek Jain




Re: Fetch and updation in single step/query

2006-04-18 Thread Michael Kruckenberg
Seems like what you need is an auto-increment key. Is that out of the  
question?


On Apr 18, 2006, at 1:34 AM, abhishek jain wrote:

Dear Friends,
I run several processes and they need to query the mysql 5.0.8  
database
simultaneously .I have a config table which have the record id. I  
need to

fetch that and increment that .What I feel that the same record id is
fetched by different simultaneosly before i update .Can anyone help  
me in

either:
1)telling me a single query which will fetch and incr. in the same  
query. so

the problem of simultaneously queries are solved.
2)A system by which delaying the other queries are done, I use PHP .
Expecting a quick reply.
Thanks,
Abhishek Jain



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



Fetch and updation in single step/query

2006-04-17 Thread abhishek jain
Dear Friends,
I run several processes and they need to query the mysql 5.0.8 database
simultaneously .I have a config table which have the record id. I need to
fetch that and increment that .What I feel that the same record id is
fetched by different simultaneosly before i update .Can anyone help me in
either:
1)telling me a single query which will fetch and incr. in the same query. so
the problem of simultaneously queries are solved.
2)A system by which delaying the other queries are done, I use PHP .
Expecting a quick reply.
Thanks,
Abhishek Jain