Refer to the MongoDB input format SQL generator byPHP

Source: Internet
Author: User
In the past few days, refer to the representation of MongoDB input parameter formats such as find ({a: 1, $ or: {c: 1, B: 2, I wrote an array that parses the data and outputs the analysis data by using this input method, so that the subsequent class usage does not know whether this design method is practical or not, and the comments in it may not be correct, after all, copy and paste it from SyntaxHig.

In the past few days, refer to the representation of MongoDB input parameter formats such as find ({a: 1, $ or: {c: 1, B: 2, I wrote an array that parses the data and outputs the analysis data by using this input method, so that the subsequent class usage does not know whether this design method is practical or not, and the comments in it may not be correct, after all, I copy and paste my own source code. For more information, see the attachment. here I paste the test data to show what I want to do. please give me some advice (it is so difficult to paste a code)

Array
(
[Parameters] => Array
(
[P11] => 1
[P12] => foo
[P13] => 1
[P14] => 3
)

[Into] => t1
[Write] => ('a' =: p11, 'C' =: p12)
[Detail] => Array
(
[Where] => Array
(
[C] => 1
[A] => 1
)

)

[Query] => 'C' =: p13 and 'A' =: p14
[SQL] => UPDATE 't1 'C' =: p13 and 'A' =: p14 SET ('a' =: p11, 'C' =: p12) WHERE 'C' =: p13 and 'A' =: p14
)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.