Why is the fetch_object () method used for database values in many source codes unnecessary? ------ solution -------------------- The reason is much better. efficiency & nbsp; fetch_object efficiency is the lowest & nbsp; you can refer to the following picture & nbsp; X axis shows the number of data & nbsp; the y axis is the time spent & nbsp; & why does the object method not need to be used for database values in many source codes?
Which of the following is the fetch_object () method?
------ Solution ----------------------
The reason is much better.
1. efficiency problem fetch_object efficiency is the lowest. you can refer to the following picture. the x axis is the number of data. the y axis is the time spent.
2. PHP's operations on arrays are especially convenient for various array operation functions as for objects.
3. The data obtained from fetch_object does not conform to the object-oriented idea (because all member attributes are public) and does not comply with the object-oriented process (because they are objects)