thinkphp small problem, everybody help, thank you

Source: Internet
Author: User
$optstr =implode (', ', $array);
$where [' CID ']=array (' in ', $optstr);
I would like to ask the second sentence of the array () inside the ' in ' is what also mean, what role??? Thank you, sir.


Reply to discussion (solution)

Let's make a statement: I didn't use thinkphp.
Assuming your code is correct, he says:
In the final executed SQL instruction there is a component such as CID in (1,2,3,4)

is executed in parentheses.

Here in is actually the SQL keyword, just thinkphp encapsulated, and finally will parse into the most native SQL statement, you can use $model->getlastsql () to see the recent execution of a SQL to understand

In is the SQL statement in which your CID value can be a value in the $OPTSTR array

  • 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.