无法理解为什么这段代码不起作用。 我的sql数据库有点麻烦。 $ sqll =“SELECT * FROM netbarg WHERE r_number ='02177736'”

This is my code. I know this number(02177736) is stored in database. I'm completely new in php and mysql.

  $sqll="SELECT *  FROM netbarg WHERE r_number='02177736'";
        $result=mysql_query($sqll,$connection);
$ro= mysql_fetch_array ($result);
var_dump($ro);

but it returns false to me. I have no idea. Any help will be appreciated.

You should check for errors and report them, e.g.

$sqll="SELECT *  FROM netbarg WHERE r_number='02177736'";
$result=mysql_query($sqll,$connection);
//check for errors!
if (!$result) {
    die('Invalid query: ' . mysql_error());
}
$ro= mysql_fetch_array ($result);
var_dump($ro);

Also, you should using something other than the mysql_ functions as are deprecated - see http://php.net/manual/en/mysqlinfo.api.choosing.php

User mysqli_query insted of mysql_query and the first pass connection and then your query.

$sqll="SELECT *  FROM netbarg WHERE r_number='02177736'";
$result=mysqli_query($connection,$sqll);
//check for errors!
if (!$result) {
die('Invalid query: ' . mysqli_error());
}
$ro= mysqli_fetch_array ($result);
var_dump($ro);