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.

jSmith
  • 275
  • 1
  • 4
  • 13
  • Are you referring to stored procedures? – Philipp Jul 26 '13 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? – jSmith Jul 26 '13 at 18:09
  • Maybe this helps you: http://stackoverflow.com/questions/17550244/does-server-side-javascript-function-have-performance-issues-in-mongodb – Philipp Jul 27 '13 at 05:11

0 Answers0