mysqli : mysqli_result could not be converted to string

前端 未结 2 1544
無奈伤痛
無奈伤痛 2020-12-12 06:01

I know there have been asked lots of similair questions like this one, but I just can\'t translate it to my problem so thats why I ask again. The code used to work fine but

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-12 06:21

    That is because mysqli_result is a result set. I don't know what you would expect to gain from echoing it, just as you wouldn't get anything meaningful from echoing the result set of a mysql_query query which uses a SELECT.

    You need to use the various class methods to access data in the result set.

    http://php.net/manual/en/class.mysqli-result.php

提交回复
热议问题