This is from php : http://php.net/manual/en/function.mysql-query.php
Use of this extension is discouraged. Instead, the MySQLi or PDO_MySQL extension should be used. See also MySQL: choosing an API guide and related FAQ for more information. Alternatives to this function include:
See http://www.php.net/manual/en/mysqli.query.php for Detailed examples
Proper way to do it ??
$mysqli = new mysqli("localhost", "user", "password", "db");
$sql = "SELECT * FROM `apps` WHERE `MCName` = '%s' ";
if ($mysqli->connect_errno) {
printf("Connect failed: %s\n", $mysqli->connect_error);
exit();
}
$result = $mysqli->query(sprintf($sql, $mysqli->real_escape_string($username)));
$rows = $result->num_rows;