Ask questions about SQL queries. please come in with jordan102 as you did yesterday.

Source: Internet
Author: User
Ask the SQL query question. please come in with jordan102 as you did yesterday! I used select * fromuser_listwhereuser_idin (883985, 883987, 802928, 802929). The query result contains only one row of returned values, not four rows. Have you tested the SQL statement in the php environment, thank you for asking the SQL query question about the query results under the command line. please come in with jordan102 as we did yesterday!
I use select * from user_list where user_id in (883985,883987, 802928,802929 );
The query results only return values in one row, not four rows. Have you tested this SQL statement in the php environment? thank you!

Query results under the command line
========================================================== ==================================
| 802928 | fnms | NULL | none of you |
| 802929 | xwei | NULL | |
| 883985 | gggef | NULL | gggef |
| 883987 | eeett | NULL | eeett |


On the php page

$ Newsql = "select * from user_list where user_id in (883985, 883987, 802928, 802929 )";
$ RsList = mysqli_query ($ conn, $ newsql)
While ($ row = mysqli_fetch_array ($ rsList ))
{
Echo"
------------- User_id: ". $ row [" user_id "];
}
The following is the result.
========================================================== ========================================================== ============
------------- User_id: 802928

------ Solution --------------------
Run the SQL statement in the command line or phpmyadmin. check whether the result is correct.

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.