I want to get data from a table in my MySQL database.
$linkID = mysql_connect($host, $user, $pass) or die("Could not connect to host.");
mysql_select_db($database, $linkID) or die("Could not find database.");
$search='flu';
$query = mysql_query("SELECT * From ProviderDxCptCodes WHERE CodeType='CPT'");
$rows = array();
while($row = mysql_fetch_assoc($query)) {
$rows[] = $row;
}
echo json_encode($rows);
I want this query to show me all CPT codes matching the search string flu
. How can I do that?