Questions about SQL queries, same as yesterday please jordan102 come in for a moment.

Source: Internet
Author: User
Ask SQL query question, same as yesterday please jordan102 come in a moment!
I use SELECT * from User_list where user_id in (883985,883987,802928,802929);
Query results only one row return value, not four rows, ask you have in PHP environment with this SQL statement test, thank you

Query results under the command line
=============================================================
| 802928 | Fnms | Fnms | NULL | Not You |
| 802929 | Xwei | Xwei | NULL | Captain |
| 883985 | GGGEF | GGGEF | NULL | GGGEF |
| 883987 | Eeett | Eeett | NULL | Eeett |


In 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 are the print results
==========================================================================================
-------------user_id:802928

------Solution--------------------
First, execute the SQL statement under the command line or phpMyAdmin, and see if 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.