[Solved] Call to undefined function mysql_connect()

Prompt Call to undefined function mysql_connect(), which is obviously a function call error

I found a blog and realized that the tutorial I was watching was too old. Now the mysql function does not use mysql_connect().

To:

mysqli_connect()

Can

In the same way, other functions are similarly modified, some of which require an additional $connectionparameter, as follows:

mysql_select_db (database name) changed to mysqli_select_db( $conneciton, database name)
mysql_query (sql statement) changed to mysqli_query( $connection, sql statement)
mysql_num_rows( $result) changed to mysqli_num_rows( $result)

Guess you like

Origin blog.csdn.net/weixin_44559752/article/details/109752293