0

I would love to store queries (sometimes they can be unknown to me), in either MongoDB or MySQL.

In MySQL, I believe I'd have to store the query as text, so for example how could I retrieve that query from MySQL and be able to run it?

$collection->findOne( array('email' => $user_data['email']) );

I am also considering MongoDB, if there could be a more efficient way of storing a query.

3
  • Are you referring to stored procedures? Commented Jul 26, 2013 at 10:29
  • I checked it out and found about the stored procedures equivalent on Mongo, which is Stored Javascript, but then I'm thinking how can I store my query in the functions, and then be able to run the query? Commented Jul 26, 2013 at 18:09
  • Maybe this helps you: stackoverflow.com/questions/17550244/… Commented Jul 27, 2013 at 5:11

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.