Now I have a vehicle maintenance table t_car_byxx, vehicle maintenance photo table t_car_byxx_img, a dictionary list sys_dict_data, including a dictionary table records the vehicle maintenance in the table pictures type (image is classified into repair list that maintenance certificate, insurance certificate, the illegal proof, yearly check of certificate, the value in the table corresponding dictionary) and vehicle maintenance in the table if repair, maintenance, insurance, whether to violate the rules and regulations, whether annual inspection (value is the value of the corresponding dictionary tables 1, no corresponding to the value value of 0 in the dictionary table), now I have a demand, need to query information on vehicle maintenance and the corresponding maintenance item image information (if it is otherwise don't display images), shown in the following order, how to write the SQL to teach bosses,
CodePudding user response:
Related field and structure of the table is as follows: