wincen Posted February 26, 2008 Share Posted February 26, 2008 Is it possible to execute a prepared statement that does multiple queries? For example, say I need to delete a user from my database. I would need to delete all his child records. In a stored procedure typically I would delete all the child records, like messages from the user, then i would delete the actual user record. With a prepared statement can I do the same, if so how? Otherwise would I need to run multiple prepared statements to do the same? Quote Link to comment Share on other sites More sharing options...
aschk Posted February 27, 2008 Share Posted February 27, 2008 You'd need more than 1 prepared statement, as I imagine your SP would usually have more than one delete query Consider using FK constraints with cascading. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.