警告:mysql_query()期望参数1是字符串,对象在...中给出(需要param ???)[重复]

I got this message

Warning: mysql_query() expects parameter 1 to be string, object given in

In regard to this line:

$QSelPro = mysql_query($con,"SELECT * FROM products");

what's wrong with this????

</div>

From the PHP manual for mysql_query():

mixed mysql_query ( string $query [, resource $link_identifier = NULL ] )

Thus, change to

$QSelPro = mysql_query("SELECT * FROM products", $con);

Also from the same page:

Warning
This extension is deprecated as of PHP 5.5.0, and will be removed in the future...

In other words, consider not using mysql_*. It is deprecated. Instead use mysqli_* or pdo