PHP Warning: mysql_query() expects at most 2 parameters, 3 given PHP Warning: mysql_fetch_array() expects parameter 1 to be resource, null given line create error: $Result = mysql_query($_VAR['MYSQL']['DBNAME'], $query, $link); while($Row = mysql_fetch_array($Result)) PHP: Thank you.
mysql_query ( string $query [, resource $link_identifier = NULL ] ) So it takes the query as the first argument and the identifier of the database as the second argument. First connect to the database. Then select the db. Then you can do your query. Try $Result = mysql_query($query); (Note: the mysql functions won't be supported in future versions. Start learning mysqli or PDO.)