MySQL Forums
Forum List  »  Stored Procedures

Re: Dynamic Sql Statement in SP
Posted by: Ming Yeung
Date: January 10, 2006 12:24AM

Hi Roland,

I just read your post reagrding the variables with & without @.

http://forums.mysql.com/read.php?98,62373,62512#msg-62512

Then I tried to change the user variables to local variables, but got one error from the line: PREPARE STMT FROM Sql;

From: http://dev.mysql.com/doc/refman/5.0/en/sqlps.html
> preparable_stmt is either a string literal or a user variable that contains the text of the statement

I just read that it has to be either a String 'SELECT XXX' Or a user variable. I think I shouldn't use user variables, because many concurrent connections(same user) are excuting the same SP from my web application. How do I handle this issue?

Any problem with synchronization when many connections(the same user) accessing the same @variable?

Thanks,
Ming



Edited 2 time(s). Last edit at 01/10/2006 12:37AM by Ming Yeung.

Options: ReplyQuote


Subject
Views
Written By
Posted
2754
January 09, 2006 06:22AM
1480
January 09, 2006 08:06AM
1218
January 09, 2006 02:10PM
1797
January 09, 2006 08:02PM
Re: Dynamic Sql Statement in SP
1680
January 10, 2006 12:24AM
1452
January 10, 2006 03:07AM
1669
January 10, 2006 06:51AM
1394
January 10, 2006 01:49PM
1740
January 10, 2006 06:35PM
1545
January 10, 2006 07:22PM
1630
January 10, 2006 10:33PM
1626
January 11, 2006 03:10AM
2197
January 11, 2006 04:27AM
1652
January 11, 2006 06:54AM
1474
January 11, 2006 03:34PM
1647
January 11, 2006 03:56PM
1635
January 12, 2006 03:20AM
1445
January 12, 2006 04:44AM
1414
January 11, 2006 09:08PM
1662
January 12, 2006 03:11AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.