I have a nested mysql_query.
$resultSub = mysql_query("SELECT * 
                            FROM ensembles 
                           WHERE en_name = $name 
                       LEFT JOIN ensemble_names on ensembles.开发者_StackOverflow中文版en_name = ensemble_names.en_nm_ID 
                       LEFT JOIN students on ensembles.en_stu = students.s_ID 
                       LEFT JOIN part_names on ensembles.en_part = part_names.p_nm_ID 
                        ORDER BY $sort $orderBy");
The query works fine without the WHERE clause, which I thought may be filtering out rows for the LEFT JOIN command, but that's not the case.
The WHERE clause should be placed after the LEFT JOINs:
$resultSub = mysql_query("SELECT * 
                            FROM ensembles 
                       LEFT JOIN ensemble_names on ensembles.en_name = ensemble_names.en_nm_ID 
                       LEFT JOIN students on ensembles.en_stu = students.s_ID 
                       LEFT JOIN part_names on ensembles.en_part = part_names.p_nm_ID 
                           WHERE en_name = $name 
                        ORDER BY $sort $orderBy");
Well, you put the WHERE clause in the wrong place.
Read the documentation.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论